Skip to content

Commit

Permalink
Build wasm with custom profile to make binary smaller.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramirisu committed Sep 18, 2024
1 parent 0684549 commit 1831ec8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy_github_page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Build
run: |
cargo build --release --target wasm32-unknown-unknown
wasm-bindgen --no-typescript --target web --out-dir ./dist/tetris --out-name "tetris" ./target/wasm32-unknown-unknown/release/tetris.wasm
cargo build --profile wasm-release --target wasm32-unknown-unknown
wasm-bindgen --no-typescript --target web --out-dir ./dist/tetris --out-name "tetris" ./target/wasm32-unknown-unknown/wasm-release/tetris.wasm
- name: Copy Assets
run: |
Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ log = { version = "*", features = [
"max_level_debug",
"release_max_level_warn",
] }

[profile.wasm-release]
inherits = "release"
opt-level = "s"
strip = "debuginfo"

0 comments on commit 1831ec8

Please sign in to comment.