Add Quantinuum WASM adapter for Frontier decoder - #680
Conversation
|
Reviewed the full diff, checked the branch out in a worktree, ran the stated verification, built the wasm, and drove it through wasmtime. The adapter works and the ABI matches Quantinuum's published constraints. One blocker and a few fixes before merge. Verified
BlockerThe repo's The crate uses Should fix
Notes, not blocking
|
|
One more request on framing, separate from the items above. The module itself is not runtime-specific. It has zero imports, targets What is Quantinuum-shaped is the ABI: i32-only arguments, at most one i32 return, an Suggested framing:
|
|
On the build scripts specifically: please replace the PowerShell + shell pair with one script that runs the same way on Linux, macOS, and Windows. Two copies of the same logic in two languages drift, and the repo already avoids this. Suggested shape:
If the wasm build is expected to become a supported deliverable rather than an experiment, the other option is a subcommand in |
d8d4f14 to
c960e16
Compare
|
Addressed the review in
Validation now passes: 84 tests (1 ignored), native and Wasm-target Clippy with warnings denied, full pre-commit, dependency integrity, both builder entry paths, zero-import inspection, and runtime init/decode/result/reset. |
c960e16 to
e590a72
Compare
Summary
pecos-frontier-wasmcdylibwith zero imports and ani32-only ABI compatible with Quantinuum hardwarewasm32-unknown-unknownwhile preserving timing on native and WASI targetsjust build-frontier-wasm [dem]recipeExported ABI
init() -> ()frontier_decode(i32, i32, i32, i32) -> ()frontier_result_0..3() -> i32frontier_status() -> i32frontier_reset() -> ()Validation
cargo test -p pecos-trellis -p pecos-frontier -p pecos-frontier-wasm(84 passed, 1 ignored)cargo clippy -p pecos-trellis -p pecos-frontier -p pecos-frontier-wasm --all-targets -- -D warningsRUSTFLAGS='--cfg getrandom_backend="unsupported"' cargo clippy --release --target wasm32-unknown-unknown -p pecos-frontier-wasm -- -D warningsuv run --frozen pre-commit run --all-filesscripts/dependency-integrity-check.shjust build-frontier-wasmand the direct Python builder with an explicit DEMCARGO_TARGET_DIRReal-model build/decode latency still needs measurement against the hardware timeout once a production DEM is selected.