Skip to content

Commit

Permalink
Remove mutable-globals requirement
Browse files Browse the repository at this point in the history
This is now enabled by default in Rust / LLVM.
  • Loading branch information
RReverser committed Dec 18, 2024
1 parent 11d361f commit 73d5965
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ The easiest way to configure those flags is:

```toml
[target.wasm32-unknown-unknown]
rustflags = ["-C", "target-feature=+atomics,+bulk-memory,+mutable-globals"]
rustflags = ["-C", "target-feature=+atomics,+bulk-memory"]

[unstable]
build-std = ["panic_abort", "std"]
Expand All @@ -147,7 +147,7 @@ If you prefer not to configure those parameters by default, you can pass them as
In that case, the whole command looks like this:

```sh
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' \
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory' \
rustup run nightly-2024-08-02 \
wasm-pack build --target web [...] \
-- -Z build-std=panic_abort,std
Expand Down
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"scripts": {
"build:wasm-st": "wasm-pack build --target web",
"build:wasm-mt": "cross-env RUSTFLAGS=\"-C target-feature=+atomics,+bulk-memory,+mutable-globals\" wasm-pack build --target web --out-dir pkg-parallel -- --features parallel -Z build-std=panic_abort,std",
"build:wasm-mt": "cross-env RUSTFLAGS=\"-C target-feature=+atomics,+bulk-memory\" wasm-pack build --target web --out-dir pkg-parallel -- --features parallel -Z build-std=panic_abort,std",
"build:wasm": "run-p build:wasm-st build:wasm-mt",
"build": "npm run build:wasm && webpack build ./index.js --mode production -o dist --output-filename index.js && shx cp index.html dist/"
},
Expand Down
2 changes: 1 addition & 1 deletion test/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[target.wasm32-unknown-unknown]
rustflags = ["-C", "target-feature=+atomics,+bulk-memory,+mutable-globals"]
rustflags = ["-C", "target-feature=+atomics,+bulk-memory"]

[unstable]
build-std = ["panic_abort", "std"]

0 comments on commit 73d5965

Please sign in to comment.