Requirements#
This section contains the requirements for the WRT project.
Functional Requirements#
The interpreter shall be resumable, allowing operation with fuel or other implementations of bounded run-time that require the interpreter to be halted and later resumed as if it was not halted. |
The interpreter shall be executable on bare-metal environments with no reliance on any specific functionality from the provided execution environment, as it shall be ready for embedding to any environment that Rust can compile for. |
The interpreter shall yield back control flow eventually, allowing users to call the interpreter with a bound and expect a result in a finite amount of time or bytecode operations, even if the bytecode itself never finishes execution. |
The interpreter state shall be able to halt on one computer and continue execution on another, enabling various workflows in deployments of multiple computers for load-balancing or redundancy purposes. |
The interpreter shall implement the WebAssembly Component Model Preview 2 specification, including: - Component model validation - Resource type handling - Interface types - Component instantiation and linking - Resource lifetime management - Custom section handling - Component model binary format parsing |
The interpreter shall strictly implement the WebAssembly Component Model binary format as specified in the official WebAssembly Component Model specification at WebAssembly/component-model, including:
|
The interpreter shall implement the WASI logging API as specified in the wasi-logging proposal, providing: - Support for all defined log levels (Error, Warn, Info, Debug, Trace) - Context-based logging - Stderr integration - Thread-safe logging operations |
The WASI logging implementation shall provide platform-specific backends: - Linux: syslog integration with proper facility and priority mapping - macOS: Unified Logging System (os_log) integration - Generic fallback implementation for other platforms |
Low-Level Functional Requirements#
The interpreter shall be stackless, storing the stack of the interpreted bytecode in a traditional data structure rather than using function calls in the host environment. |
The interpreter shall be implemented in no_std Rust, only relying on functionality provided by no_std to enable execution on bare environments where no operating system is available. |
The interpreter shall support fuel bounded execution, where each bytecode instruction is associated with a specific amount of fuel consumed during execution. |
The interpreter state shall be de-/serializable to enable migration to other computers and support check-point/lock-step execution. |
The interpreter shall implement the WebAssembly Core specification, including: - Value types and reference types - Instructions and control flow - Function calls and tables - Memory and data segments - Global variables - Exception handling - SIMD operations - Threading support |
The interpreter shall implement the Component Model specification, including: - WIT format parsing and validation - Component model binary format parsing - Resource type implementation - Interface type handling - Component instantiation - Component linking - Resource lifetime management |
Dependency Requirements#
The interpreter shall have an optional dependency on the |
The interpreter may depend on the |
The interpreter shall compile on Rust |
The interpreter shall use the following tools for Component Model development: - wit-parser >= 0.12.0 for WIT file parsing and validation - wit-bindgen >= 0.12.0 for interface generation - wit-component >= 0.12.0 for component model binary format handling |
Observability Requirements#
The interpreter shall implement means for instrumentation to support certification evidence generation, debugging, and run-time monitoring. |
The instrumentation shall enable the measurement of:
|
Implementation Status#
ID |
Title |
Status |
---|---|---|
Resumable Interpreter |
implemented |
|
Baremetal Support |
planned |
|
Bounded Execution |
implemented |
|
State Migration |
planned |
|
Stackless Implementation |
implemented |
|
No Standard Library |
implemented |
|
Fuel Mechanism |
implemented |
|
State Serialization |
planned |
|
Logging Support |
implemented |
|
Math Library |
planned |
|
Rust Version |
implemented |
|
Instrumentation Support |
partial |
|
Coverage Measurement |
partial |
|
WebAssembly Component Model Support |
planned |
|
WASI Logging Support |
partial |
|
Platform-Specific Logging |
planned |
|
WebAssembly Core Implementation |
partial |
|
Component Model Implementation |
partial |
|
Component Model Tools |
partial |
|
Component Model Binary Format |
partial |
Requirement Relationships#