Skip to content

Commit 0e92fc0

Browse files
authored
fix: Define more precisely which wasm features are needed (#123)
1 parent 8d3825a commit 0e92fc0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

browser-chat/browser-wasm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ wasm-bindgen-futures = "0.4"
2222
wasm-streams = "0.4.2"
2323

2424
[package.metadata.wasm-pack.profile.release]
25-
wasm-opt = ["--all-features"]
25+
wasm-opt = ["--enable-nontrapping-float-to-int", "--enable-bulk-memory"]

browser-chat/shared/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ tokio = { version = "1", default-features = false, features = ["sync"] }
1818
tracing = "0.1"
1919

2020
[package.metadata.wasm-pack.profile.release]
21-
wasm-opt = ["--all-features"]
21+
wasm-opt = ["--enable-nontrapping-float-to-int", "--enable-bulk-memory"]

browser-echo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"scripts": {
55
"build": "cargo build --target=wasm32-unknown-unknown && wasm-bindgen ./target/wasm32-unknown-unknown/debug/browser_echo.wasm --out-dir=public/wasm --weak-refs --target=web --debug",
6-
"build:release": "cargo build --target=wasm32-unknown-unknown --release && wasm-bindgen ./target/wasm32-unknown-unknown/release/browser_echo.wasm --out-dir=public/wasm --weak-refs --target=web && wasm-opt --all-features -Os -o public/wasm/browser_echo_bg.wasm public/wasm/browser_echo_bg.wasm",
6+
"build:release": "cargo build --target=wasm32-unknown-unknown --release && wasm-bindgen ./target/wasm32-unknown-unknown/release/browser_echo.wasm --out-dir=public/wasm --weak-refs --target=web && wasm-opt --enable-nontrapping-float-to-int --enable-bulk-memory -Os -o public/wasm/browser_echo_bg.wasm public/wasm/browser_echo_bg.wasm",
77
"serve": "http-server --cors -a localhost public/"
88
},
99
"author": "n0 team",

0 commit comments

Comments
 (0)