# cloudflare/capnweb

JavaScript/TypeScript-native, low-boilerplate, object-capability RPC system

Repository: https://github.com/cloudflare/capnweb
Canonical: https://ross.abutalabs.com/products/capnweb
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-24T16:46:48+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 98, longevity 32
- inputs: {"age_days": 451, "days_push": 9, "days_rel": 13, "gap_med": 7, "n_releases_24m": 20}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3954, forks 142 (observed 2026-08-28T04:08:30.449613+00:00)

## What it is
Cap'n Web is a JavaScript/TypeScript-native, schema-free object-capability RPC library from Cloudflare, created by the Cap'n Proto author. It supports bidirectional calls, passing functions and objects by reference, and promise pipelining over HTTP, WebSocket, and postMessage, compressing to under 16 kB with zero dependencies.

## Use cases
- add rpc between a browser client and a server in javascript
- call typescript methods on a server from cloudflare workers
- replace grpc or json-rpc with a schemaless javascript rpc library
- pass functions and objects by reference over websocket
- chain dependent calls into one round trip with promise pipelining
- build bidirectional communication between node and the browser
- implement capability-based security where holding a reference grants access

## When to choose
- your entire stack is JavaScript/TypeScript and you want RPC with no schemas, code generation, or build step
- you need expressive RPC features like bidirectional calling, reference passing, or promise pipelining
- you target many runtimes (browsers, Cloudflare Workers, Node.js, Bun, Deno) and want a tiny dependency-free bundle
- you want capability-based security patterns for your API

## When to avoid
- you need non-JavaScript clients or servers, or strict schema contracts with generated code
- you need binary serialization for maximum throughput, where Cap'n Proto or protobuf fit better
- you require a 1.0-stable, long-frozen protocol; the project is still pre-1.0

## Facets
- artifact type: library
- maturity: active
- function: rpc, serialization
- domain: web-development, apis, microservices
- platform: browser, bun, serverless, cross-platform
- tags: object-capability, promise-pipelining, schemaless, bidirectional-rpc, typescript, json-serialization, capability-based-security, websocket, no-dependencies, cloudflare-workers, nodejs, deno, web-server

## Member repositories
- cloudflare/capnweb (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:30.449613+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:24:30.399945+00:00, confidence not recorded.
  - readme: https://github.com/cloudflare/capnweb (fetched 2026-08-28T04:08:30.449613+00:00, sha 4ec0c367902e)
  - registry_npm: https://registry.npmjs.org/capnweb (fetched 2026-08-29T09:18:10.417098+00:00, sha 4f83e076ab94)
- Data as of 2026-08-30T08:39:29.467469+00:00.
