Files
revive/js/emscripten/examples/web/worker.js
T
PG Herveou e07d0f0cb7 Move @parity/resolc from js-revive (#296)
- Move npm package from paritytech/js-revive 
- Rename package to `@parity/resolc`
2025-04-30 17:24:52 +02:00

15 lines
340 B
JavaScript

importScripts("./resolc_web.js");
// Handle messages from the main thread
onmessage = async function (e) {
const m = createRevive();
// Set input data for stdin
m.writeToStdin(e.data);
// Compile the Solidity source code
m.callMain(["--standard-json"]);
postMessage({ output: m.readFromStdout() || m.readFromStderr() });
};