Skip to content

Commit

Permalink
Less reliance on secret env vars in build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Dec 4, 2023
1 parent d6eabbb commit 317dc9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ wasm-opt = ['-Oz', '-g']
# Tell cargo to run `rustc` with `-C debuginfo=2` - ie, to include debug symbols.
# https://doc.rust-lang.org/cargo/reference/profiles.html#debug
debug = true
# Tell cargo to run `rustc` with `-Oz` - ie, to optimize for size.
# https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level
opt-level = 'z'

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -e

cd $(dirname "$0")/..

RUSTFLAGS='-C opt-level=z' WASM_BINDGEN_WEAKREF=1 wasm-pack build --target nodejs --scope matrix-org --out-dir pkg "${WASM_PACK_ARGS[@]}"
wasm-pack build --target nodejs --scope matrix-org --out-dir pkg --weak-refs "${WASM_PACK_ARGS[@]}"

# Convert the Wasm into a JS file that exports the base64'ed Wasm.
{
Expand Down

0 comments on commit 317dc9d

Please sign in to comment.