From a757f01018d440a803a356d9e8216285f275d669 Mon Sep 17 00:00:00 2001 From: Martin Molzer Date: Fri, 6 Nov 2026 16:43:14 +0100 Subject: [PATCH 1/4] mention tracing log fallback in changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f57ffd0..57b0ca7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ -## wasm-split-cli vfuture +## wasm-split-cli v0.2.5 - Add `Options::cost_model` with a bernoulli model (`--cost-model` in the cli). Shared chunks are merged when that lowers the expected loading time, which weighs the requests saved against the extra bytes loaded. This tends to cut the number of chunks one split module loads from hundreds to tens. The default cost model depends on the target. The web target uses the new cost model, the bundler target keeps the previous output, equivalent to `--cost-model=none`. +- Fix to keep tracing's `log` fallback active when no subscriber is configured. ## wasm-split-cli v0.2.4 From 5ba54fd7c6363e49a19910421cef04ed25ce24a6 Mon Sep 17 00:00:00 2001 From: Martin Molzer Date: Fri, 6 Nov 2026 16:44:16 +0100 Subject: [PATCH 2/4] version bump --- Cargo.lock | 2 +- crates/wasm_split_cli/Cargo.toml | 2 +- test-runner/Cargo.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58d6575..30d964c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -684,7 +684,7 @@ dependencies = [ [[package]] name = "wasm_split_cli_support" -version = "0.2.4" +version = "0.2.5" dependencies = [ "clap", "eyre", diff --git a/crates/wasm_split_cli/Cargo.toml b/crates/wasm_split_cli/Cargo.toml index 90b353c..670996b 100644 --- a/crates/wasm_split_cli/Cargo.toml +++ b/crates/wasm_split_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm_split_cli_support" -version = "0.2.4" +version = "0.2.5" authors.workspace = true categories.workspace = true edition.workspace = true diff --git a/test-runner/Cargo.lock b/test-runner/Cargo.lock index 4b43e6c..beb8650 100644 --- a/test-runner/Cargo.lock +++ b/test-runner/Cargo.lock @@ -1234,7 +1234,7 @@ dependencies = [ [[package]] name = "wasm_split_cli_support" -version = "0.2.4" +version = "0.2.5" dependencies = [ "eyre", "fixedbitset", From eccdc5939f5241868865f071d5a0d2bc0038d4ad Mon Sep 17 00:00:00 2001 From: Martin Molzer Date: Fri, 6 Nov 2026 17:06:04 +0100 Subject: [PATCH 3/4] build test runner in its own target dir --- integration/runner.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/runner.sh b/integration/runner.sh index 5eb0f5c..73894d0 100755 --- a/integration/runner.sh +++ b/integration/runner.sh @@ -5,6 +5,7 @@ export XRUSTUP_TOOLCHAIN="$RUSTUP_TOOLCHAIN" export XCARGO_BIN_NAME="$CARGO_BIN_NAME" export XCARGO_MANIFEST_PATH="$CARGO_MANIFEST_PATH" export XCARGO_TARGET_TMPDIR="$CARGO_TARGET_TMPDIR" +export XCARGO_TARGET_DIR="$CARGO_TARGET_DIR" export XCARGO_PKG_NAME="$CARGO_PKG_NAME" -unset RUSTUP_TOOLCHAIN CARGO # make sure the below invocation is done with the toolchain in test-runner +unset RUSTUP_TOOLCHAIN CARGO CARGO_TARGET_DIR OUT_DIR # make sure the below invocation is done with the toolchain in test-runner cargo run --release -p wasm-split-test-runner -- "$@" From 08ce02ae0c154090395ce07d027ab526c2753f90 Mon Sep 17 00:00:00 2001 From: Martin Molzer Date: Fri, 6 Nov 2026 17:28:30 +0100 Subject: [PATCH 4/4] format hash in report as string matches the output of running sha256sum on the files --- test-runner/src/bin/wasm-split-test-runner.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/test-runner/src/bin/wasm-split-test-runner.rs b/test-runner/src/bin/wasm-split-test-runner.rs index b6929ab..31f493d 100644 --- a/test-runner/src/bin/wasm-split-test-runner.rs +++ b/test-runner/src/bin/wasm-split-test-runner.rs @@ -53,10 +53,24 @@ fn wasm_bindgen_test_runner() -> Command { ) } -#[derive(PartialEq, Eq, Serialize)] +#[derive(PartialEq, Eq)] #[repr(transparent)] -#[serde(transparent)] struct ContentHash([u8; 32]); +impl Serialize for ContentHash { + fn serialize(&self, serializer: S) -> std::prelude::v1::Result + where + S: serde::Serializer, + { + // inline impl of hex::encode + let mut bytes = [0u8; 64]; + for (i, &byte) in self.0.iter().enumerate() { + const TABLE: &[u8; 16] = b"0123456789abcdef"; + bytes[2 * i] = TABLE[((byte & 0xf0) >> 4) as usize]; + bytes[2 * i + 1] = TABLE[(byte & 0x0f) as usize]; + } + serializer.serialize_str(str::from_utf8(&bytes).unwrap()) + } +} impl std::fmt::Debug for ContentHash { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { for d in &self.0 {