Viewing an unverified historical record. Archive replay and provenance checks have not passed for this point. Switch record →
v0.4.0 · ELASTIC POOLS & TRUSTED BINDINGS · C/C++ ABI v8

Run untrusted AI code in elastic OS process pools.

Dedicated Linux OS sandboxes (Namespaces, Landlock, Seccomp, cgroup v2) powered by Zero-JIT quickjs-turbo — sub-20 MiB serving PSS, scale-to-zero elastic pools, and Dual-Runtime Trusted Bindings (v0.4.0) that keep secrets and sockets out of untrusted JS.

v0.4.0 release →
$curl -fsSL https://github.com/rowanellis-113/capsid/releases/download/v0.4.0/install.sh | CAPSID_REPO=rowanellis-113/capsid bash -s -- v0.4.0
// Self-contained ESM — zero ambient fs, env, net, or FFI
export default {
  async fetch(request) {
    const url = new URL(request.url);
    return Response.json({
      ok: true,
      path: url.pathname,
      sandbox: "namespaces + landlock + seccomp",
    });
  },
};
ELASTIC ISOLATION PIPELINE ZERO JIT RWX
Host
Elastic Pool
Fair LRU · cgroup v2
→
OS Capsule
Linux Sandbox
NS · Landlock · Seccomp
→
Worker
quickjs-turbo
19.3 MiB · 21.4 ms
Why Capsid

Security without the V8 memory tax or MicroVM latency

01 / Hard OS Isolation

Default-deny Linux capsule

Dedicated OS process per worker fenced by NS, Landlock, Seccomp, and cgroup v2 — deny-by-default egress, zero FFI/RWX.

JIT RWX pagesZero
02 / Elastic Process Pools

Scale-to-zero & full OS reclaim

Idle apps drop to 0 processes (0 B RAM), wake on quickjs-turbo bytecode, and return 100% of private pages on exit.

10 KiB / 1 MiB C ABI cold8.9 / 21.4 ms
03 / Tenant-Fair Density

Hundreds of workers per 2 GiB

Two-stage tenant-fair eviction, delegated cgroup v2 memory.max, and bounded-drain blue-green rollouts.

2 GiB warm pool705 workers
Elastic OS Process Pools

Serverless elasticity with real OS-process memory reclamation

Scale-to-zero Linux worker processes (v0.4.0) — sub-10 ms C ABI cold starts, tenant-fair LRU, and 100% kernel page reclamation on exit.

Trusted Bindings · Dual-Runtime Isolation

Give untrusted code real capabilities without leaking secrets or sockets

Host-provisioned capsid/binding-v1 packages (databases, SQLite, secret vaults, internal APIs) execute in isolated QuickJS heaps inside the same OS-sandboxed worker — zero shared JS memory, zero cost when unused, and Web-native RPC proxies (v0.4.0). In managed production (capsid/host-v2), only the Host installs packages and secrets under paths.bindings / paths.secrets; untrusted apps can only reference approved IDs and narrow permissions.

Use Cases

Built for untrusted code under tight budgets

01 / AI INFRASTRUCTURE Flagship

AI Agent & Code-Gen Sandboxes

Execute LLM-generated JS tools in kernel-enforced sandboxes with explicit egress allowlists and instant teardown.

8.9 ms cold (10 KiB)Default-deny egressZero ambient FS
02 / MULTI-TENANT SAAS High Density

Customer Plugins & Webhooks

Run custom tenant hooks without per-tenant containers — fair eviction, delegated cgroup v2, and isolated Binding RPC v2 (RpcTarget + credit streams) keep secrets out of tenant JS.

705 workers / 2 GiBBinding RPC v2RpcTarget & Streams
03 / SERVERLESS & EDGE Elastic Pools

Long-Tail FaaS & Private Edge

Scale idle apps to zero OS processes, wake on demand with cold queueing, and keep active SSE/WS streams exempt from idle eviction.

19.3 MiB tree2,131 QPS / MiBScale-to-zero
04 / SYSTEMS SDK Embeddable

Embeddable C11 / C++11 Engine

Drop <capsid/runtime.h> (ABI v8) into gateways or databases with Host-owned TLS, credits, and credential Bindings.

C11 / C++11 ABI v8CMake SDKLinux · macOS · Win
Verified Benchmarks

Comprehensive strength across every production axis

Generated directly from 4,533 replay-verified archive files across three fair reference tiers.

Throughput vs. memory frontier

Top-left is ideal: higher req/s in smaller PSS (log X-axis)

Unified runtime scorecard

Grouped by tier: Isolated · Non-JIT Peer · Unsandboxed JIT Ceiling

Raw serving throughput — requests per second

median of five 15 s rounds at 64 connections / 64 in-flight
Median throughput (req/s) and 1 KiB memory efficiency
Per-request latency (ms) in the last measured round
Density & Trade-Offs

How many isolated tenants fit in 2 GiB of RAM?

Scenario selection guide — OS isolation vs V8 isolates vs JIT ceilings
Quick Start · v0.4.0

Ship your first worker in 60 seconds

Unified Config v2 (capsid/app-v2), Elastic Pools, and Trusted Bindings (RPC v2) on Linux, macOS, and Windows. Official five-platform release: v0.4.0.

Strict sandbox & managed elastic pools are Linux-only; macOS & Windows share the same --app-dir CLI and ABI v8 SDK.
01Install

Install prebuilt v0.4.0

Downloads & SHA-256 verifies capsid-host, capsid-worker, bytecode compiler, and ABI v8 SDK. All 5 packages · Build from source.

v0.4.0 · ABI v8SHA-256 verified
bash · Linux & macOS
curl -fsSL https://github.com/rowanellis-113/capsid/releases/download/v0.4.0/install.sh \
  | CAPSID_REPO=rowanellis-113/capsid bash -s -- v0.4.0
export PATH="$HOME/.local/bin:$PATH"
02Create app

Write handler & capsid/app-v2

Self-contained bundle.mjs + default-deny capsid.json (zero ambient modules or egress).

capsid/app-v2Default-deny
~/capsid-hello · bundle.mjs + capsid.json
mkdir -p ~/capsid-hello && cd ~/capsid-hello

cat > bundle.mjs <<'EOF'
export default {
  fetch(req) {
    return Response.json({
      hello: "from Capsid",
      path: new URL(req.url).pathname,
    });
  },
};
EOF

cat > capsid.json <<'EOF'
{
  "apiVersion": "capsid/app-v2"
}
EOF
03Run

Launch Config v2 Host

Auto-discovers capsid-worker and mounts at / once capsid-host-ready-v1 prints.

Unified --app-dirMounted at /
Terminal 1 · Start Host
capsid-host --app-dir . --listen 127.0.0.1:8080 --ready-fd 1
Terminal 2 · Send Request
curl http://127.0.0.1:8080/ping
# => {"hello":"from Capsid","path":"/ping"}
04Production

Elastic pools, Trusted Bindings, npm & bytecode

Add pool.minReady: 0 for scale-to-zero, attach isolated Trusted Bindings with narrowed permissions & valueFrom secrets, bundle npm apps with esbuild, or precompile trusted quickjs-turbo bytecode (Host config).

Scale-to-zeroDual-runtime BindingsSigned attestation
{
  "apiVersion": "capsid/app-v2",
  "entry": "bundle.mjs",
  "worker": {
    "memoryMax": "256MiB",
    "jsHeap": "64MiB"
  },
  "pool": {
    "minReady": 0,
    "maxWorkers": 8,
    "idleTimeout": "60s",
    "queueRequests": 64,
    "queueTimeout": "5s"
  }
}
Verifiable Evidence

Replay every byte yourself

Sealed lane logs, exact-body checks, smaps_rollup snapshots, and SHA-256 manifests for every verified point.