Summary
PluginRuntimeConfig exposes enable_simd: bool and PluginRuntime::new forwards it to wasmtime via config.wasm_simd(...). However, wasmtime enables the relaxed-simd proposal by default, which requires the base SIMD proposal. As a result, every enable_simd: false configuration — with or without enable_threads — fails initialization with:
cannot disable the simd proposal but enable the relaxed simd proposal
The public config option is therefore unusable.
Repro
let cfg = PluginRuntimeConfig {
max_memory_bytes: 16 * 1024 * 1024,
enable_simd: false,
enable_threads: false,
};
assert!(PluginRuntime::new(cfg).is_err()); // currently always true
Pinned by tests::plugin_runtime_new_rejects_disabled_simd_due_to_relaxed_simd_default in https://github.com/streamer45/streamkit/blob/main/crates/plugin-wasm/src/lib.rs.
Suggested fix
Either:
- Honor
enable_simd: false end-to-end by also calling config.wasm_relaxed_simd(false) (and any other dependent proposals) in PluginRuntime::new, or
- Remove the field from the public config if disabling SIMD is intentionally unsupported.
Once fixed, update plugin_runtime_new_rejects_disabled_simd_due_to_relaxed_simd_default to assert the intended contract.
Discovered by
PR #467 (Phase 3 coverage initiative — Stream B).
Summary
PluginRuntimeConfigexposesenable_simd: boolandPluginRuntime::newforwards it to wasmtime viaconfig.wasm_simd(...). However, wasmtime enables the relaxed-simd proposal by default, which requires the base SIMD proposal. As a result, everyenable_simd: falseconfiguration — with or withoutenable_threads— fails initialization with:The public config option is therefore unusable.
Repro
Pinned by
tests::plugin_runtime_new_rejects_disabled_simd_due_to_relaxed_simd_defaultin https://github.com/streamer45/streamkit/blob/main/crates/plugin-wasm/src/lib.rs.Suggested fix
Either:
enable_simd: falseend-to-end by also callingconfig.wasm_relaxed_simd(false)(and any other dependent proposals) inPluginRuntime::new, orOnce fixed, update
plugin_runtime_new_rejects_disabled_simd_due_to_relaxed_simd_defaultto assert the intended contract.Discovered by
PR #467 (Phase 3 coverage initiative — Stream B).