mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-20 18:56:17 +00:00
Update EMSDK to 5.0.0 (#479)
Emscripten 4.0.12 introduced breaking change by changing module factory to always return promise even if `WASM_ASYNC_COMPILATION=0`. To overcome this, build emscripten compiler without MODULARIZE with custom export of `createRevive`.
This commit is contained in:
1 parent
71d584dd6e
commit
810a36b18b
9 files changed
+19
-6
No files matched your search
@@ -0,0 +1,6 @@
|
||||
return Module;
|
||||
}
|
||||
if (typeof module === "object" && typeof module.exports === "object") {
|
||||
module.exports = createRevive;
|
||||
} else if (typeof define === "function" && define["amd"])
|
||||
define([], () => createRevive);
|
||||
@@ -0,0 +1,2 @@
|
||||
function createRevive(moduleArg) {
|
||||
var Module = moduleArg || {};
|
||||
@@ -1,7 +1,7 @@
|
||||
const soljson = require("solc/soljson");
|
||||
const createRevive = require("./resolc.js");
|
||||
|
||||
async function compile(standardJsonInput) {
|
||||
function compile(standardJsonInput) {
|
||||
if (!standardJsonInput) {
|
||||
throw new Error("Input JSON for the Solidity compiler is required.");
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
importScripts("./resolc_web.js");
|
||||
|
||||
// Handle messages from the main thread
|
||||
onmessage = async function (e) {
|
||||
onmessage = function (e) {
|
||||
const m = createRevive();
|
||||
|
||||
// Set input data for stdin
|
||||
|
||||
Reference in new issue
Block a user