Skip to content

Commit d171199

Browse files
author
“ramfox”
committed
using --all-features flag in wasm-opt
1 parent 1fdba43 commit d171199

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ jobs:
5353
node-version: 20
5454

5555
- name: Install rust stable toolchain
56-
# must be 1.86.0 for now, it is the latest version that works
57-
# well with `[email protected]`, and we are forced to use that
58-
# version in the `Install tools` action
59-
uses: dtolnay/[email protected]
56+
uses: dtolnay/rust-toolchain@stable
6057

6158
- name: Add wasm target
6259
run: rustup target add wasm32-unknown-unknown

browser-chat/browser-wasm/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ tracing-subscriber-wasm = "0.1.0"
2020
wasm-bindgen = "=0.2.100"
2121
wasm-bindgen-futures = "0.4"
2222
wasm-streams = "0.4.2"
23+
24+
[package.metadata.wasm-pack.profile.release]
25+
wasm-opt = ["--all-features"]

browser-chat/shared/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ rand = "0.8"
1616
serde = "1"
1717
tokio = { version = "1", default-features = false, features = ["sync"] }
1818
tracing = "0.1"
19+
20+
[package.metadata.wasm-pack.profile.release]
21+
wasm-opt = ["--all-features"]

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 -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 --all-features -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)