SpaceWasm is a NASA JPL WebAssembly interpreter designed for resource-constrained spacecraft systems. It implements a constrained form of the WebAssembly 1.0 specification for executing portable onboard programs. A streaming decoder reads modules in chunks, validates them in one pass, and converts instructions into an interpretation-focused intermediate representation. Its custom memory model uses fixed-size pages to provide deterministic allocation behavior and avoid panic on allocation failure. Embedders can expose controlled host functions while restricting program access, compute time, and system interactions. The project emphasizes sandboxing, portability, predictable resource use, and compatibility with flight-software requirements. Tests, fuzzing, benchmarks, requirements, and integration components are included in the Rust codebase.
Features
- WebAssembly 1.0 interpretation
- Single-pass streaming decoder
- Fixed-memory module validation
- Deterministic page-based allocation
- Embeddable host function hooks
- Testing, fuzzing, and benchmarking