From ea7e291e6a11ddd78cdf5eac98b3659294813fa4 Mon Sep 17 00:00:00 2001 From: czoli1976 <64466170+czoli1976@users.noreply.github.com> Date: Sun, 3 May 2026 16:19:37 +0100 Subject: [PATCH] build(deps): enable rustfft `wasm_simd` feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `wasm_simd` is cfg-gated inside rustfft to wasm32 + the feature flag, so it's a no-op on non-wasm targets — safe to enable unconditionally for the cdylib/staticlib/native bin matrix. On `wasm32-unknown-unknown` with `+simd128`, this lets rustfft's auto-planner pick `FftPlannerWasmSimd` instead of falling back to the scalar planner. STFT/iSTFT in DFN3 then use v128 butterflies. Net effect on DFN3 streaming RTF: within noise (Chromium 0.066 -> 0.066, both same-machine back-to-back). The FFT sizes used by DFN3 (480 / 960 mixed-radix) don't materially benefit, but the feature is bit-exact, zero-risk, and helpful to other downstream rustfft consumers (apps with larger or power-of-2 FFT sizes). Wasm size cost: +400 KB compressed. --- libDF/Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libDF/Cargo.toml b/libDF/Cargo.toml index c0f3271ef..4e9eb8c79 100644 --- a/libDF/Cargo.toml +++ b/libDF/Cargo.toml @@ -94,7 +94,11 @@ wasm = [ hdf5-static = ["hdf5?/static"] [dependencies] -rustfft = "^6.1.0" +# `wasm_simd` is a no-op on non-wasm targets (cfg-gated inside rustfft), so +# enabling it unconditionally is safe for the cdylib/staticlib/native bin +# matrix. On `wasm32-unknown-unknown` with `+simd128` it lets rustfft's +# `FftPlannerWasmSimd` use v128 butterflies instead of scalar fallback. +rustfft = { version = "^6.1.0", features = ["wasm_simd"] } realfft = "^3.1.0" itertools = "0.12" num-complex = { version = "^0.4", features = ["serde"] }