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
+2
-2
@@ -5,9 +5,9 @@ rustflags = [
|
||||
"-Clink-arg=-sEXIT_RUNTIME=1",
|
||||
"-Clink-arg=-sALLOW_MEMORY_GROWTH=1",
|
||||
"-Clink-arg=-sEXPORTED_RUNTIME_METHODS=FS,callMain,stringToNewUTF8",
|
||||
"-Clink-arg=-sMODULARIZE=1",
|
||||
"-Clink-arg=-sEXPORT_NAME=createRevive",
|
||||
"-Clink-arg=-sWASM_ASYNC_COMPILATION=0",
|
||||
"-Clink-arg=--extern-pre-js=js/emscripten/embed/extern-pre.js",
|
||||
"-Clink-arg=--extern-post-js=js/emscripten/embed/extern-post.js",
|
||||
"-Clink-arg=-sDYNAMIC_EXECUTION=0",
|
||||
"-Clink-arg=-sALLOW_TABLE_GROWTH=1",
|
||||
"-Clink-arg=--js-library=js/emscripten/embed/soljson_interface.js",
|
||||
|
||||
@@ -3,7 +3,7 @@ inputs:
|
||||
version:
|
||||
description: ""
|
||||
required: false
|
||||
default: "4.0.9"
|
||||
default: "5.0.0"
|
||||
|
||||
|
||||
runs:
|
||||
|
||||
@@ -79,6 +79,10 @@ jobs:
|
||||
rustflags: ""
|
||||
cache-key: ${{ matrix.target }}
|
||||
|
||||
- name: Enable long paths (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: git config --system core.longpaths true
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.host == 'linux' }}
|
||||
run: |
|
||||
|
||||
@@ -18,6 +18,7 @@ This is a development pre-release.
|
||||
- Updated `musl` to `1.2.5`
|
||||
- Updated `inkwell` to `0.8.0`
|
||||
- Updated `polkavm-*` to `0.31.0`
|
||||
- Updated `EMSDK` to `5.0.0`
|
||||
|
||||
## v1.0.0
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ pub const MUSL_SNAPSHOTS_URL: &str = "https://git.musl-libc.org/cgit/musl/snapsh
|
||||
pub const EMSDK_SOURCE_URL: &str = "https://github.com/emscripten-core/emsdk.git";
|
||||
|
||||
/// The emscripten SDK version.
|
||||
pub const EMSDK_VERSION: &str = "4.0.9";
|
||||
pub const EMSDK_VERSION: &str = "5.0.0";
|
||||
|
||||
/// The subprocess runner.
|
||||
///
|
||||
|
||||
@@ -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