Files
ruvnet__ruflo/v3/@claude-flow/guidance/wasm-kernel/Cargo.toml
Claude 2dd2bb891f feat: add Rust WASM policy kernel with SIMD128 acceleration
Two-layer architecture: Layer A (Rust→WASM kernel for pure functions) +
Layer B (Node host bridge with transparent JS fallback).

Kernel modules:
- proof: SHA-256, HMAC-SHA256, content hashing, chain verification
- gates: secret scanning (8 patterns), destructive command detection (12 patterns)
- scoring: shard relevance scoring with domain/risk/keyword bonuses
- batch: 9-operation batch API to minimize WASM boundary crossings

Performance (SIMD128 enabled, 10k events):
- SHA-256 throughput: 1.80x faster (910k/s vs 505k/s)
- Secret scan (dirty): 1.96x faster (362k/s vs 185k/s)
- Secret scan (clean): 1.68x faster (676k/s vs 402k/s)
- Proof chain: 1.25x faster (61ms vs 76ms)

Includes:
- Pre-built wasm-pkg/ with SIMD+O2 optimization
- 15 acceptance tests (parity + 10k throughput benchmarks)
- ADR-G025 documenting architecture and performance
- README updated with WASM kernel docs and KPIs
- Wired exports into index.ts and package.json

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 17:44:35 +00:00

31 lines
727 B
TOML

[package]
name = "guidance-kernel"
version = "0.1.0"
edition = "2021"
description = "Rust WASM kernel for @claude-flow/guidance — deterministic policy engine"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
wasm-bindgen = "0.2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
hmac = "0.12"
hex = "0.4"
regex = "1"
js-sys = "0.3"
[dev-dependencies]
wasm-bindgen-test = "0.3"
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
[profile.release]
opt-level = 2 # O2 for speed (SIMD benefits from vectorization)
lto = true # Link-time optimization
codegen-units = 1 # Single codegen unit for max optimization
strip = true # Strip debug info