Files
8bitworkshop/extension/src/binaryen.js
T
2026-09-27 14:58:28 +02:00

10 lines
550 B
JavaScript

// binaryen - build.mjs aliases the binaryen package to this module, which
// loads it from the worker's asset root: the repo's node_modules in
// development, or the downloaded verilog pack. Only the Verilog platform
// imports it, when it loads.
const path = require('path');
const { workerData } = require('worker_threads');
if (!workerData || !workerData.rootDir) throw new Error('binaryen: no asset root (load the Verilog platform in a worker)');
module.exports = require(path.join(workerData.rootDir, 'node_modules', 'binaryen', 'index.js'));