Context
Part of the Rust core epic (#95, Phase 3). The Rust core currently compiles only as a PyO3 extension. The RFC envisions the same core running in browsers (WASM), edge functions, and other language runtimes via C FFI.
Goal
Compile the Rust core to WASM and provide C FFI for language-agnostic bindings, enabling TypeSchema, ValidationEngine, and QueryCompiler to run outside Python.
Scope
WASM target
C FFI
Multi-language bindings (stretch)
Build & CI
Dependencies
- Core API stabilization (all Phase 1-2 issues should be settled)
Acceptance criteria
wasm-pack build produces a working .wasm + JS glue
- A minimal JS test validates a type name and compiles a query from the browser
- C header is generated and a minimal C program links against the library
- No PyO3 dependency in the WASM/FFI build
Context
Part of the Rust core epic (#95, Phase 3). The Rust core currently compiles only as a PyO3 extension. The RFC envisions the same core running in browsers (WASM), edge functions, and other language runtimes via C FFI.
Goal
Compile the Rust core to WASM and provide C FFI for language-agnostic bindings, enabling
TypeSchema,ValidationEngine, andQueryCompilerto run outside Python.Scope
WASM target
#[cfg(target_arch = "wasm32")]guards for PyO3-free buildswasm-bindgenorwasm-packsetup for browser/Node.jsValidationEngine,QueryCompiler,TypeSchemavia JS-friendly APIC FFI
cbindgenheader generationtype_bridge_*function prefix, opaque handles, error codestype_bridge_free_*functionsMulti-language bindings (stretch)
napi-rsor WASMBuild & CI
wasm-pack buildin CIfeatures = ["python", "wasm", "ffi"]Dependencies
Acceptance criteria
wasm-pack buildproduces a working.wasm+ JS glue