Add all resolc dependencies to resolc_web.js file (#176)

This commit is contained in:
Sebastian Miasojed
2025-02-11 11:55:24 +01:00
committed by GitHub
parent 374563bbe5
commit 79ec4dd04b
20 changed files with 494 additions and 393 deletions
+7 -11
View File
@@ -1,18 +1,14 @@
importScripts('./soljson.js');
importScripts('./resolc.js');
importScripts("./resolc_web.js");
// Handle messages from the main thread
onmessage = async function (e) {
const m = createRevive();
const m = createRevive();
m.soljson = Module;
// Set input data for stdin
m.writeToStdin(e.data);
// Set input data for stdin
m.writeToStdin(e.data);
// Compile the Solidity source code
m.callMain(["--standard-json"]);
// Compile the Solidity source code
m.callMain(['--standard-json']);
postMessage({output: m.readFromStdout() || m.readFromStderr()});
postMessage({ output: m.readFromStdout() || m.readFromStderr() });
};