Skip to content

Commit 95c3702

Browse files
committed
Add shell scripts and cleanup flags
1 parent 9c5d05f commit 95c3702

6 files changed

+16
-4
lines changed

build_wasm.ps1

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$env:RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals"
2+
cargo +nightly build --example simple --target wasm32-unknown-unknown --release -Z build-std=std,panic_abort
3+
4+
wasm-bindgen target/wasm32-unknown-unknown/release/examples/simple.wasm --out-dir ./examples/target/ --target no-modules

examples-wasm-pack/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2021"
99
crate-type = ["cdylib", "rlib"]
1010

1111
[dependencies]
12-
wasm_thread = { path = "../../." }
12+
wasm_thread = { path = "../." }
1313
log = "0.4"
1414
env_logger = "0.7"
1515
wasm-bindgen = "0.2"
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
$env:RUSTFLAGS="--cfg=web_sys_unstable_apis -C embed-bitcode=yes -C target-feature=+simd128,+atomics,+bulk-memory,+mutable-globals"
2-
wasm-pack build --dev --out-dir ./module/target --target no-modules
1+
$env:RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals"
2+
wasm-pack build --dev --out-dir ./no-module/target --target no-modules
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals" \
4+
wasm-pack build --dev --out-dir ./no-module/target --target no-modules

examples-wasm-pack/web-build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
$env:RUSTFLAGS="--cfg=web_sys_unstable_apis -C embed-bitcode=yes -C target-feature=+simd128,+atomics,+bulk-memory,+mutable-globals"
1+
$env:RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals"
22
wasm-pack build --dev --out-dir ./module/target --target web --features wasm_thread/es_modules

examples-wasm-pack/web-build.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
RUSTFLAGS="-C target-feature=+atomics,+bulk-memory,+mutable-globals" \
4+
wasm-pack build --dev --out-dir ./module/target --target web --features wasm_thread/es_modules

0 commit comments

Comments
 (0)