diff --git a/.github/workflows/build_ghpages.yml b/.github/workflows/build_ghpages.yml index 29efd34c..83e36ffd 100644 --- a/.github/workflows/build_ghpages.yml +++ b/.github/workflows/build_ghpages.yml @@ -17,7 +17,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly + toolchain: stable target: wasm32-unknown-unknown profile: minimal override: true @@ -29,9 +29,7 @@ jobs: - run: rm .gitignore - run: mv .gitignore.ghpages .gitignore - run: cargo build --lib --target wasm32-unknown-unknown --release - - run: cargo install wasm-gc - - run: wasm-gc ./target/wasm32-unknown-unknown/release/customasm.wasm -o ./target/wasm32-unknown-unknown/release/customasm.gc.wasm - - run: mv ./target/wasm32-unknown-unknown/release/customasm.gc.wasm ./web/customasm.gc.wasm + - run: mv ./target/wasm32-unknown-unknown/release/customasm.wasm ./web/customasm.wasm - run: git config user.name github-actions - run: git config user.email github-actions@github.com - run: git add -A diff --git a/.gitignore b/.gitignore index 67073720..24a74d62 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ /test.asm /test_output_mismatch -/web/customasm.gc.wasm \ No newline at end of file +/web/customasm.wasm \ No newline at end of file diff --git a/build_wasm.ps1 b/build_wasm.ps1 index f17f80cb..aa2ae564 100644 --- a/build_wasm.ps1 +++ b/build_wasm.ps1 @@ -1,9 +1,6 @@ # Build wasm binary cargo build --lib --target wasm32-unknown-unknown --release -# Reduce binary size -wasm-gc "./target/wasm32-unknown-unknown/release/customasm.wasm" -o "./target/wasm32-unknown-unknown/release/customasm.gc.wasm" - # Copy to web folder -Copy-Item -Path "./target/wasm32-unknown-unknown/release/customasm.gc.wasm" -Destination "./web/customasm.gc.wasm" +Copy-Item -Path "./target/wasm32-unknown-unknown/release/customasm.wasm" -Destination "./web/customasm.wasm" diff --git a/src/webasm/mod.rs b/src/webasm/mod.rs index e35ef743..e0febf14 100644 --- a/src/webasm/mod.rs +++ b/src/webasm/mod.rs @@ -37,7 +37,7 @@ pub unsafe extern fn wasm_assemble( None => { let mut err = Vec::::new(); - report.print_all(&mut err, &fileserver); + report.print_all(&mut err, &fileserver, true); return wasm_string_new_with( String::from_utf8(err).unwrap()); } diff --git a/web/main.js b/web/main.js index 7ae055c1..31add197 100644 --- a/web/main.js +++ b/web/main.js @@ -12,7 +12,7 @@ function main() window.onkeydown = onKeyDown window.onbeforeunload = onBeforeUnload - fetch("customasm.gc.wasm") + fetch("customasm.wasm") .then(r => r.arrayBuffer()) .then(r => WebAssembly.instantiate(r)) .then(wasm =>