Skip to content

Commit

Permalink
debug for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
goulvenclech committed Dec 4, 2024
1 parent 2cec70e commit bbab3c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
bins: cargo-codspeed, wasm-bindgen-cli, just, wasm-opt

- name: Build (WASM)
run: just build-wasm release
run: just build-wasm bench

- name: Build the benchmark target(s)
run: cargo codspeed build
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ resolver = "2"
opt-level = 3
lto = "fat"
codegen-units = 1

[profile.bench]
inherits = "release"
debug = true
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build mode=default_mode:
build-wasm mode=default_mode:
just fetch-data
echo "Building to WASM target..."
cargo build --target wasm32-unknown-unknown {{ if mode == "release" {"--release"} else {""} }} --features wasm
cargo build --target wasm32-unknown-unknown {{ if mode == "release" {"--release"} else if mode == "bench" {"--profile bench"} else {""} }} --features wasm
wasm-bindgen ./target/wasm32-unknown-unknown/{{mode}}/csslsrs.wasm --out-dir ./packages/csslsrs/src/generated --target=experimental-nodejs-module
wasm-opt -O4 ./packages/csslsrs/src/generated/csslsrs_bg.wasm -o ./packages/csslsrs/src/generated/csslsrs_bg.wasm
pnpm -C ./packages/csslsrs install
Expand Down

0 comments on commit bbab3c6

Please sign in to comment.