Skip to content

capsid v0.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Nov 07:43
· 17 commits to dev/v0.4.0 since this release

Official 0.4.0 release (runtime version 0.4.0, public C ABI v8,
FetchRPC v4-only), superseding both v0.2.2 and the 0.3.x beta series as
the current Capsid release.

Highlights

  • Dual-Runtime Trusted Bindings (Binding RPC v2): Runs Host-authored
    capsid/binding-v1 capability packages in isolated per-Binding QuickJS heaps
    inside the same OS-sandboxed worker with zero overhead when no Binding is
    attached.
    • Fair multi-runtime scheduling & three-tier quotas: Immediate round-robin
      scheduling with bounded per-turn call/frame/job budgets; atomic per-request,
      per-Binding, and per-worker ledgers for calls, streams, handles, queued
      frames, and queued bytes.
    • Call options, structured remote errors & late-result disposal: Supports
      { signal, timeoutMs } (deadline tightening only), typed remote errors
      (DOMException, QuotaExceededError, TypeError, RangeError,
      SyntaxError, URIError, Error) immune to hostile getters/proxies, and
      recursive cycle-safe disposal of late-resolved streams and handles.
    • Bidirectional credit-based Web Stream proxies: ReadableStream and
      WritableStream cross User ↔ Binding with 64 KiB credit windows/chunk
      slicing, 2 MiB staging ceilings, structured cancel/abort/error
      propagation, and strict cross-request ownership fencing.
    • Controlled Request and Response proxies: Inline fast path
      (<= 64 KiB) and credit-backed streaming bodies, immutable headers,
      multi-value Set-Cookie, Request.signal propagation, and atomic rollback
      on rejected batches.
    • Native-branded RpcTarget remote object handles: Export stateful
      sessions and nested cursors as frozen null-prototype stubs with bounded
      leases (leaseMs), explicit .dispose() / [Symbol.dispose]() /
      [Symbol.asyncDispose](), fault-isolated bounded disposal, asynchronous
      QuickJS GC-finalizer fallback, and cross-request isolation.
  • Config v2 & Elastic OS Process Pools: Orthogonal capsid/host-v2 and
    capsid/app-v2 schemas, unified capsid-host --app-dir <dir> local CLI,
    scale-to-zero (minReady: 0), bounded cold queueing, two-stage tenant-fair
    eviction, asynchronous OS page reclamation, live-traffic rolling drain, and
    delegated tenant cgroup v2 memory.max accounting.
  • Full-Duplex WebSockets (FetchRPC v4): Inbound WebSocketPair + 101
    Upgrade (allowHalfOpen, delayed accept(), blob/arraybuffer,
    subprotocols), egress-gated outbound ws/wss, and non-101 gzip HTTP
    Upgrade fallback.
  • Zero-JIT quickjs-turbo & Public C ABI v8: Native register-frame
    interpreters on Linux (x86_64/arm64), macOS Intel (x86_64), and Windows
    (x86_64) with portable C fallback on Apple Silicon and sanitizers.
  • Verified Five-Platform Native Archives: Fully static musl Linux
    (x86_64/arm64), native thin macOS (arm64/x86_64), and static-CRT
    MSVC Windows (x86_64).

Exact Source and Verification

  • Source: 0522d0d7e5abb2d7934832e0afe28670819b495e (tree bda1aec5b73a8229986a8939b3cd3263a0cec232, 5548 tracked entries).
  • Formatting: passed (Attempt 1).
  • Testing validity: all 8 hosted jobs passed (Attempt 1).
  • Tag Release: all 8 validation jobs (Release/LTO WPT + delegated sandbox, ASan, UBSan, TSan, fuzz, POSIX/macOS host library, Windows native host library, hosted evidence index) and all 5 native package jobs passed (Attempt 2; Attempt 1 passed 6 of 7 validation jobs and hit a transient TSan cold-spawn 80 ms queue timeout on host_eviction_tenant_quota_swap_and_rejections, while Testing validity 46224450540 passed TSan 1053/1053 on the identical commit).
Platform Archive SHA-256
darwin-arm64 capsid-0.4.0-darwin-arm64.tar.gz 1d8db000219d3748f770be06532a2833b0d0cd12f98d1c60d3e5614422c3b0bd
darwin-x86_64 capsid-0.4.0-darwin-x86_64.tar.gz 3ece5b89cf0a76bc8cd819c1fedb720e7b906551f0c237037f608897da0320c0
linux-musl-arm64 capsid-0.4.0-linux-musl-arm64.tar.gz 09f406ed8c35ecd4448eb124bbef00adbcfbb30376726d37467d429fe26b74b9
linux-musl-x86_64 capsid-0.4.0-linux-musl-x86_64.tar.gz b091aca0afc6892fccd013fea8ffc587cb5cb1bf30aab520900f210db9ff9e30
windows-x86_64 capsid-0.4.0-windows-x86_64.zip b12829eeb47ac45d997c7801d06bf3768fd57600ce30eea1a1ed6cf5711fea62

Compatibility

  • Public C ABI remains v8 and FetchRPC remains v4-only (compatible with
    v0.3.2-beta.1 embedders and capsid/binding-v1 packages; applications
    upgrading from v0.2.x must rebuild against ABI v8 and migrate to
    capsid/app-v2).
  • Recompile trusted QuickJS bytecode with the matching v0.4.0
    capsid-bytecode-compile because build compatibility identity includes the
    runtime version and overlay manifest.

Install

Install v0.4.0 on Linux or 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

On Windows PowerShell (x86_64), download capsid-0.4.0-windows-x86_64.zip and
its .sha256 sidecar, verify the checksum, and extract into a clean directory.
Do not mix capsid-host, capsid-worker, capsid-bytecode-compile, or the
C/C++ SDK across builds.

See Use Binding RPC v2,
Use WebSockets,
and Releases and Installation.

Linux strict sandboxing requires the documented kernel and delegation
prerequisites. Native macOS and Windows builds are for trusted development and
integration. The pinned compatibility profile retains five raw WPT file
failures; green CI is not full standards conformance. The latest accepted local
WSL2 benchmark session (24671d9 on dev/v0.3.2) measures a local Release/LTO
rebuild and does not measure the distributed v0.4.0 release archives directly.