Skip to content

Commit

Permalink
Tweak benchmarks to Node.js for now
Browse files Browse the repository at this point in the history
Looks like some configs changed and benchmarks are currently broken in both Node and browser.

This allows to run them at least in Node again.
  • Loading branch information
RReverser committed Dec 6, 2023
1 parent 6a4a00e commit ea120e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 52 deletions.
47 changes: 0 additions & 47 deletions benchmarks/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const libs = (
].map(async dir => {
try {
const impl = await import(`./pkg/${dir}/serde_wasm_bindgen_benches.js`);
await impl.default(); // Init Wasm
// await impl.default(); // Init Wasm
return { name: dir, impl };
} catch (err) {
console.warn(err);
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"pretty-bytes": "^6.0.0"
},
"scripts": {
"build:swb": "wasm-pack build -t web --out-dir pkg/serde-wasm-bindgen -- --features serde-wasm-bindgen",
"build:swb-reftypes": "cross-env RUSTFLAGS=\"-C target-feature=+reference-types\" WASM_BINDGEN_EXTERNREF=1 wasm-pack build -t web --out-dir pkg/serde-wasm-bindgen-reftypes -- --features serde-wasm-bindgen",
"build:json": "wasm-pack build -t web --out-dir pkg/serde-json -- --features serde-json",
"build:msgpack": "wasm-pack build -t web --out-dir pkg/msgpack -- --features msgpack",
"build:swb": "wasm-pack build -t nodejs --profiling --out-dir pkg/serde-wasm-bindgen -- --features serde-wasm-bindgen",
"build:swb-reftypes": "cross-env RUSTFLAGS=\"-C target-feature=+reference-types\" WASM_BINDGEN_EXTERNREF=1 wasm-pack build -t nodejs --profiling --out-dir pkg/serde-wasm-bindgen-reftypes -- --features serde-wasm-bindgen",
"build:json": "wasm-pack build -t nodejs --profiling --out-dir pkg/serde-json -- --features serde-json",
"build:msgpack": "wasm-pack build -t nodejs --profiling --out-dir pkg/msgpack -- --features msgpack",
"build": "npm run build:swb && npm run build:json",
"test": "node index.mjs"
}
Expand Down

0 comments on commit ea120e5

Please sign in to comment.