A state-centric distributed runtime with native economic incentives
INOS is a biological runtime for the internet age. It replaces traditional message passing with shared reality, enabling zero-copy communication across Go, Rust, and JavaScript boundaries.
We eliminate serialization overhead by allowing components to share memory via SharedArrayBuffer (SAB).
- Mutate: A worker updates the shared state.
- Signal: The worker increments an Atomic Epoch Counter.
- React: Subscribers detect the epoch change and synchronize instantly.
inos_v1/
├── kernel/ # Layer 2: Go WASM Kernel (The Brain)
│ ├── core/ # Scheduler, Mesh Coordinator, Memory management
│ ├── threads/ # WebWorker supervisors and unit loaders
│ └── transport/ # P2P stack (Gossip, DHT, WebRTC)
├── modules/ # Layer 3: Rust WASM Modules (The Muscle)
│ ├── sdk/ # Shared primitives (Epochs, SAB, Registry)
│ ├── compute/ # High-performance compute units (GPU, Image, etc.)
│ └── storage/ # Encrypted storage (ChaCha20, Brotli)
├── frontend/ # Layer 1: React + Vite Host (The Body)
│ ├── app/ # Feature-driven UI components
│ └── src/wasm/ # JS Bridge, Dispatcher, and SAB layout
├── protocols/ # Cap'n Proto schemas (The Language)
└── docs/ # Architectural directives and specifications
INOS uses Cap'n Proto for all cross-boundary communication. Unlike JSON or Protobuf, Cap'n Proto requires no parsing step; data is accessed directly from the wire format.
- Zero-Copy Reads: Pointers into the message buffer, no deserialization.
- Type Safety: Compile-time schema validation across Go, Rust, and TypeScript.
- Compact Binary Format: Efficient for SAB regions and P2P mesh traffic.
All schemas live in protocols/schemas/ with versioned subdirectories:
| Domain | Schemas | Purpose |
|---|---|---|
system/v1 |
sab_layout, syscall, runtime |
Kernel internals, SAB region definitions |
compute/v1 |
capsule |
Job requests/results for Rust units |
p2p/v1 |
mesh, gossip, delegation |
Peer discovery, state propagation |
identity/v1 |
identity |
Cryptographic identity and attestation |
protocols/schemas/— All.capnpschema definitionsscripts/gen-proto-go.sh— Go code generation scriptmodules/sdk/src/protocols/— Rust bindings (viabuild.rs)
INOS keeps the public module execution boundary centered on explicit host-managed memory, SAB access, and stable exported entrypoints rather than a wasm-bindgen-generated API surface.
That gives the runtime:
- Explicit ABI ownership: the host decides how memory, queues, and result buffers are managed.
- SAB-native interoperability: the hot path is built around shared memory and atomics, not object marshalling.
- Predictable lifecycle control: allocations and result ownership stay visible at the runtime boundary.
- Compatibility headroom: loader-side shims can exist where needed without changing the architectural contract.
Instead of exposing many #[wasm_bindgen] functions, we expose a single generic dispatcher:
#[no_mangle]
pub extern "C" fn compute_execute(
library_ptr: *const u8, library_len: usize,
method_ptr: *const u8, method_len: usize,
input_ptr: *const u8, input_len: usize,
params_ptr: *const u8, params_len: usize,
) -> *mut u8The ComputeEngine internally routes to registered units (Image, Crypto, Boids, etc.).
modules/compute/src/lib.rs—compute_executeentry pointmodules/compute/src/engine.rs— Unit registry and routingmodules/storage/src/lib.rs— Storage module entrypointsfrontend/src/wasm/module-loader.ts— Host-side module loading and compatibility shims
Go's WASM runtime cannot natively share SharedArrayBuffer as its linear memory. INOS solves this with a Synchronized Memory Twin architecture.
- Rust/JS: Direct SAB access (true zero-copy).
- Go Kernel: Operates on its own private linear memory.
The Kernel maintains a Local Replica (Twin) synchronized via explicit bridge calls:
// Bulk copy from Global SAB → Local Twin
js.CopyBytesToGo(localTwin, view.Call("subarray", offset, offset+size))- Snapshot Consistency: Kernel operates on a stable snapshot, immune to tearing reads.
- Zero-Allocation Sync:
ReadAtpattern recycles buffers, minimizing GC pressure. - Double-Buffered State: Front Buffer (SAB, mutated by Rust/JS) ↔ Back Buffer (Go Twin, stable for logic).
docs/go_wasm_memory_integrity.md— Full architectural deep-divekernel/threads/supervisor/sab_bridge.go— SAB bridge implementationfrontend/src/wasm/bridge-state.ts— Shared bridge views and epoch subscriptions
INOS uses a standardized Unit Proxy Model to expose Rust performance to the JavaScript frontend without complex glue code.
- Registry: Rust units (Boids, Math, Crypto) register their capabilities in a global table.
- Marshalling: The
compute_executeWASM export serves as a generic entry point. - Dispatch: The frontend
Dispatcherroutes requests to dedicated background workers (plug) or executes them synchronously. - Zero-Copy: Parameters and results stay in the SAB; only pointers and lengths cross the WASM boundary.
Based on the ArchitecturalBoids implementation:
- Decoupled Compute: Physics (Boids) and Matrix generation (Math) run in autonomous workers.
- Pulse Signaling: Workers wait on the high-precision
PulseWorker(Zero-CPU idling). - Epoch-Based GPU Sync: React only flips the GPU buffer pointers when the
IDX_MATRIX_EPOCHincrements, ensuring tear-free rendering at 60FPS+.
INOS provides a rich set of built-in functionalities exposed via the dispatch system:
| Unit | Capabilities |
|---|---|
| Compute | BLAKE3/SHA256 Hashing, Brotli Compression/Decompression |
| GPU | PBR Rendering, WGSL Execution, Particle Systems, SSAO/SSR |
| Math | Matrix/Vector SIMD-ready operations, Quaternions, Projections |
| Boids | Massively parallel flocking physics, Evolutionary scaling |
| Audio | FFT/Spectrogram, Spatial Audio, FLAC/WAV Encoding |
| Data | Parquet/JSON/CSV processing, SQL-like aggregations |
| Storage | Content-addressed storage, ChaCha20 encryption, P2P replication |
- Go 1.21+, Rust 1.75+, Node.js 20+, Cap'n Proto 1.0+
make setup # Install tools and generate protocols
make build # Build Kernel, Modules, and Frontend
cd frontend && npm run devINOS is licensed under the Business Source License 1.1 (BSL 1.1).
- Free for Individuals & Small Teams: Permitted for entities with <$5M annual revenue and <50 employees.
- Commercial Use: Requires a separate agreement for larger corporations ("Fat Checks").
- Eventual Open Source: Becomes MIT Licensed on 2029-01-01.
See LICENSE for full legal text.