@@ -6,7 +6,7 @@ let profile = "debug";
66let cargoFlags = "" ;
77// Keep .github/workflows/ci.yml in sync with these flags, so wasm-opt works.
88let rustFlags =
9- "-C target-feature=+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext,+simd128,+extended-const,+multivalue,+reference-types,+tail-call" ;
9+ "-C target-feature=+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext,+simd128,+extended-const,+multivalue,+reference-types,+tail-call" ;
1010let wasmBindgenFlags = "--encode-into always --target web --reference-types" ;
1111let target = "wasm32-unknown-unknown" ;
1212let targetFolder = target ;
@@ -36,9 +36,9 @@ if (process.argv.some((v) => v === "--unstable")) {
3636// Use the nightly toolchain, which enables some more optimizations.
3737if ( process . argv . some ( ( v ) => v === "--nightly" ) ) {
3838 toolchain = "+nightly" ;
39- cargoFlags +=
40- " -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort" ;
41- rustFlags += " -Z wasm-c-abi=spec" ;
39+ cargoFlags += " -Z build-std=std,panic_abort" ;
40+ rustFlags +=
41+ " -Z wasm-c-abi=spec -Z unstable-options -C panic=immediate-abort " ;
4242
4343 // FIXME: Apparently the multivalue ABI is broken again.
4444 // Caused by: https://github.com/rust-lang/rust/pull/135534
@@ -71,20 +71,20 @@ execSync(
7171 ...process . env ,
7272 RUSTFLAGS : rustFlags ,
7373 } ,
74- }
74+ } ,
7575) ;
7676
7777execSync (
7878 `wasm-bindgen ${ wasmBindgenFlags } livesplit-core/target/${ targetFolder } /${ profile } /livesplit_core.wasm --out-dir src/livesplit-core` ,
7979 {
8080 stdio : "inherit" ,
81- }
81+ } ,
8282) ;
8383
8484fs . createReadStream (
85- "livesplit-core/capi/bindings/wasm_bindgen/web/index.ts"
85+ "livesplit-core/capi/bindings/wasm_bindgen/web/index.ts" ,
8686) . pipe ( fs . createWriteStream ( "src/livesplit-core/index.ts" ) ) ;
8787
8888fs . createReadStream (
89- "livesplit-core/capi/bindings/wasm_bindgen/web/preload.ts"
89+ "livesplit-core/capi/bindings/wasm_bindgen/web/preload.ts" ,
9090) . pipe ( fs . createWriteStream ( "src/livesplit-core/preload.ts" ) ) ;
0 commit comments