Skip to content

SliceVM Runtime: System Architecture & Internal Specification Index (v0.15.0)

Welcome to the SliceVM Runtime System Architecture and Internal Specification (docs/system/). Engineered in pure Rust (edition = 2024, rust-version = "1.98.0", opt-level = 3, lto = "fat", codegen-units = 1, panic = "abort"), Slice replaces the legacy POSIX + monolithic V8/JSC assumptions of Node.js, Deno, and Bun with four orthogonal, tightly integrated Rust crates:

  1. slice-cas - Zero-Stat Content-Addressed Storage (SLICE_CAS v1), Oxc (v0.160.0) AOT TypeScript/TSX Compiler, Oxc Semantic/AST Dead-Export Tree-Shaker, & SLICEEXE Standalone Executable Linker.
  2. slice-io - Direct Kernel Completion Ring Engine (Linux io_uring IORING_SETUP_SQPOLL + Windows NT IOCP FFI + 64 KB Page-Aligned Fixed Slab Buffers).
  3. slice-sandbox - MicroVM-Grade Object Capabilities (FsCap, NetCap, EnvCap, ExecCap), Dynamic SES Intrinsic Lockdown, Deterministic CPU Fuel & Byte Cage, & Linux x86_64 WRPKRU Protection-Key Domain Scaffolding.
  4. slice-engine - Hybrid Three-Tier Execution Core: Tier-1 Default SLICEBC\x01 Precompiled Boa CodeBlock CAS (vm/boacas.rs, vendor/boa_engine/SLICE_PATCH.md) + Pre-Warmed boa_engine Pool + Native Rust Host Intrinsics, Tier-0 SLICESNP Snapshot VM, & Tier-2 Unboxed 64-Bit Numeric Register VM (vm/numeric_vm.rs).

For user-facing documentation and guides, see docs/README.md and docs/general/09_benchmarks_testing_and_docker_suite.md. For empirical cross-runtime benchmark numbers, see tests/reports/latest.md.


Document Subsystem / Scope Key Source Modules Covered
00_index.md Executive Overview, 4-Crate Topology, Crate & Module Map, & Legacy Runtime Bottlenecks Workspace Overview
01_cas_bundler_and_oxc_compiler.md Zero-Stat SLICE_CAS v1 Binary Format, Oxc v0.160.0 TS/TSX Compiler, Semantic Lowering, Oxc AST Array Pipeline Fusion, ESM-First "exports", Cold-Method require Inliner, Reverse-Topological Oxc Semantic/AST Tree-Shaker, & Single-Copy SLICEBC\x01/SLICEBOA CAS Deduplication crates/slice-cas/src/{lib.rs,archive/,bundler/,compiler/,linker/}
02_tiered_execution_and_boa_vm.md Hybrid Three-Tier Execution Pipeline (SLICEBC\x01 Precompiled Boa CodeBlock CAS Default, SLICESNP, Legacy SLICEBOA, WarmBoaRealm Pool, Persistent Realm Cache __slice_rc, 32-Bit shards_mask Preludes 00..19 + Pre-Fused node:* Bits 19..28, Hardware SHA-NI & Native Intrinsics, & Tier-2 Unboxed 64-Bit Numeric Register VM) crates/slice-engine/src/{vm/,isolate/,runtime/,preludes/,intrinsics/,bindings/}, vendor/boa_engine/SLICE_PATCH.md
03_security_sandbox_ocap_and_mpk.md 5-Ring Zero-Trust Security Architecture: OCap CapabilityToken (FsCap/NetCap/EnvCap/ExecCap), Dynamic SES Prototype Integrity (__slice_check_ses), CPU Fuel & Memory Cage, Linux WRPKRU Hardware MPK, Pre-Connect DNS SSRF Firewall, & Outbound Egress Secret DLP crates/slice-sandbox/src/{lib.rs,compartment/,manifest/,net/,vfs/}, crates/slice-engine/src/{isolate/,net/outbound_http.rs}
04_networking_wintertc_and_event_loop.md Multi-Worker slice serve, 3-Level Async Concurrency Architecture, Outbound HTTP/1.1 & TLS 1.3 (rustls + OUTBOUND_CONN_POOL), Deterministic Time-Travel Event Loop, RFC 6455 WebSocket Engine, Raw TCP/TLS/UDP Sockets, & Uint8Array Buffer + Node Core Tier-1 crates/slice-cli/src/server/, crates/slice-engine/src/{runtime/event_loop.rs,net/,preludes/node_builtins.rs}
05_wasm_workers_and_kernel_io.md Pure-Rust WebAssembly (wasmi v2.0.0, Shared Per-Isolate wasmi::Store, GLOBAL_WASM_MODULE_CACHE, 5-Ring WASM Cage), Capability-Attenuated MicroVM Web Workers & node:worker_threads (IDLE_WORKER_POOL), Direct Kernel Completion Rings (io_uring & IOCP), & OS-Native notify File Watcher crates/slice-engine/src/runtime/{wasm/,workers.rs}, crates/slice-io/src/lib.rs, crates/slice-cli/src/config/
06_edge_kv_ai_sandbox_and_mcp.md 16-Way Sharded Slice.kv (EDGE_KV_SLAB), Multi-Tenant --tenant-dir Atomic Hot-Swap, SplitMix64 --deterministic Replay, AI Agent “Code Mode” (Slice.evalSandbox, < 5 us Slice.checkpoint/restore), Time-Travel slice test, & Built-In MCP Server (slice mcp) crates/slice-engine/src/isolate/state_and_kv.rs, crates/slice-cli/src/{server/mod.rs,commands/test_runner.rs,diagnostics/}
docs/README.md Complete Documentation Hub (docs/general/, docs/guides/, & docs/system/) User Guides, CLI Reference, & Compatibility Matrix
tests/reports/latest.md Verified Cross-Runtime Linux x86_64 Docker Benchmark Report (Slice vs Bun, Deno, and Node.js across all 33 workloads) & 09_benchmarks_testing_and_docker_suite.md benches/, tests/apps/, tests/frameworks/, tests/case_studies/
vendor/boa_engine/SLICE_PATCH.md SLCB\x01 Precompiled CodeBlock Binary Serializer/Deserializer, Monomorphic Inline Cache, & Direct ECMA-404 JSON Fast Paths vendor/boa_engine/src/{script.rs,builtins/json/mod.rs,vm/inline_cache/mod.rs,vm/runtime_limits.rs}

+---------------------------------------------------------------------------------------------------+
| Slice (Nexus-JS) v0.15.0 Host |
| |
| +---------------------------------------------------------------------------------------------+ |
| | slice-sandbox: Zero-Trust OCap, SES & Hardware Boundary | |
| | +----------------------------------------+ +------------------------------------------+ | |
| | | Tenant Compartment A | | Tenant Compartment B | | |
| | | - SES Frozen Intrinsics (lockdown) | | - Pure Compute (Zero Ambient Authority) | | |
| | | - Scoped FsCap / NetCap / EnvCap | | - Deterministic CPU Fuel & Byte Cage | | |
| | | - Linux SYS_pkey_alloc + WRPKRU Domain | | - Linux SYS_pkey_alloc + WRPKRU Domain | | |
| | +----------------------------------------+ +------------------------------------------+ | |
| +---------------------------------------------------------------------------------------------+ |
| |
| +---------------------------------------------------------------------------------------------+ |
| | slice-engine: Hybrid Three-Tier Execution Pipeline | |
| | +--------------------------+ +-------------------------------+ +----------------------+ | |
| | | Tier 0: SLICESNP VM | | Tier 1: Zero-Copy SLICEBC\x01 | | Tier 2: Peak Native | | |
| | | - Sub-Microsecond Boot | | - Precompiled Boa CodeBlock | | - 32-Reg Numeric VM | | |
| | | - Pre-Parsed Opcode Ops | | - Pre-Warmed Boa Realm Pool | | - Recurrence Lowering| | |
| | | - WinterTC Edge Routing | | - Native Rust Host Intrinsics | | - Zero Heap Allocs | | |
| | +--------------------------+ +-------------------------------+ +----------------------+ | |
| +---------------------------------------------------------------------------------------------+ |
| |
| +---------------------------------------------------------------------------------------------+ |
| | slice-cas: Zero-Stat Content-Addressed Storage & Bundler | |
| | Oxc v0.160 TS Compiler -> Oxc Semantic/AST Tree-Shaker -> BLAKE3-256 -> 64B Aligned CAS | |
| +---------------------------------------------------------------------------------------------+ |
| |
| +---------------------------------------------------------------------------------------------+ |
| | slice-io: Direct Kernel Completion Ring Engine | |
| | Linux io_uring (IORING_SETUP_SQPOLL + 64KB Fixed Slab Buffers) | Windows NT IOCP FFI | |
| +---------------------------------------------------------------------------------------------+ |
+---------------------------------------------------------------------------------------------------+


4. Why Legacy Runtimes Hit a Cold-Start and Density Wall

Section titled “4. Why Legacy Runtimes Hit a Cold-Start and Density Wall”

To understand why Slice achieves sub-microsecond in-process isolate startup, single-digit millisecond cold CLI execution, and multi-fold lower memory footprints across real-world TypeScript + node_modules workloads (see tests/reports/latest.md for the latest verified benchmark telemetry across all 33 workloads), examine the four structural bottlenecks in Node.js, Deno, and Bun:

  1. The POSIX Filesystem Metadata Tax (stat / lstat / readdir Amplification):
    • Resolving a 500-module graph or a node_modules tree in Node.js triggers over 1,500 synchronous/asynchronous stat() and open() system calls walking up directory hierarchies (node_modules/pkg/package.json, index.js, extensions). On containerized overlay filesystems (OverlayFS) or cloud block volumes (AWS EBS / GCP PD), this metadata chatter consumes 40% to 70% of startup time.
  2. Eager Source Parsing & Monolithic Isolate Bootstrap:
    • Spinning up a fresh V8 isolate without a custom snapshot takes 5 ms - 40 ms and 20 MB - 50 MB of heap. Even with snapshots, parsing hundreds of kilobytes of unreferenced barrel exports (such as hono/index.js re-exporting 14 router/adapter modules when an app only imports { Hono }, or semver/index.js loading 48 submodules when an app only calls valid, coerce, gt, and satisfies) wastes milliseconds of CPU time before the first line of user code runs.
  3. Readiness-Poll Thread-Pool Contention (epoll + libuv Worker Threads):
    • Node.js and Deno offload filesystem operations to background thread pools. Under high multi-tenant concurrency, thread synchronization, mutex handoffs, and kernel context switches introduce tail-latency spikes.
  4. Ambient Authority vs. Heavyweight VM Isolation:
    • Node.js and Bun execute with full ambient OS permissions; any compromised transitive npm dependency can read ~/.ssh, harvest process.env, or exfiltrate data. Traditional microVMs (Firecracker) solve this by booting a separate guest Linux kernel per tenant, costing 125 ms cold start and 30 MB - 128 MB per tenant.