Edge Node (Rust Daemon)
The Q-OS Edge Node (`qos-runtime`) is a single, statically compiled Rust binary. It orchestrates the entire lifecycle of a physical interaction: terminating HTTP/WebSocket connections, booting WASM sandboxes, managing state, and finding peers.
#The Execution Pipeline
When a guest scans a QR code and submits an action via the Micro-UI, the request travels through a strict, linear pipeline:
1. Bootloader
Actix-Web receives the REST request, decodes the payload, and validates API keys or rate limits.
2. Sandbox Manager
Wasmtime spins up a fresh, isolated memory sandbox. The requested WASM module is loaded from the LRU cache (or disk).
3. Execution
The `run` entry point is invoked. The module executes synchronously, using the `qos-sdk` to read/write state.
4. State & Telemetry
Changes are written atomically to Sled. The Telemetry engine broadcasts these changes over WebSocket to the Admin HUD.
#Wasmtime Sandboxing
We use the Bytecode Alliance's Wasmtime engine. Every module invocation receives a completely fresh memory space. This means a memory leak or panic in a community module cannot crash the daemon or corrupt another guest's session.
#Deny-by-Default Capability ABI
WASM modules are inherently sandboxed and have zero access to the host machine. To allow modules to do useful work, Q-OS provides a strict, capability-gated ABI.
Modules cannot open sockets, read arbitrary files, or access the network. They can only call the functions exposed by the host (wrapped by the qos-sdk crate), which restricts them to reading and writing isolated Sled state keys.
⚠️ WARNING