| id | 65 |
|---|---|
| title | Spike WASM-Embedded Weasel Inference |
| status | ✅ |
Evaluate a WASM-based inference path that can be embedded in mdsmith with no runtime dynamic library dependency.
- Choose one Go-hosted WASM runtime candidate
(
wazerov1.11.0 with the default wazevo optimizing compiler) and define module loading strategy. - Build a minimal proof of concept that embeds a
.wasmartifact withgo:embedand runs inference in-process. The guest reuses the plan-64 classifier package verbatim, compiled withGOOS=wasip1 GOARCH=wasm -buildmode=c-shared. - Verify deterministic output behavior on a fixed corpus and fixed model parameters. Five in-process and five cross-process runs produced the same digest.
- Measure CPU latency and memory overhead versus current MDS029 heuristic, pure-Go spike, and yzma spike baselines.
- Measure binary-size impact with embedded
.wasmartifact. - Define artifact update workflow and integrity checks (SHA256 pin on embedded wasm bytes, wazero validates on load).
- Document fallback boundaries when WASM init or inference fails.
Findings and recommendation live in the spike README.
- Prototype runs with no
YZMA_LIBand no external dynamic libs. - Embedded WASM artifact loads via
go:embed. - Deterministic behavior is confirmed across repeat runs.
- CPU latency and memory metrics are captured.
- Binary-size impact is measured and documented.
- Recommendation is made: reject this path at the current classifier size. Keep the pure-Go classifier (plan 64) as the CPU fallback for MDS029.