Tuesday, September 23, 2025

The Digital Press

All the Bits Fit to Print

Ruby Web Development Artificial Intelligence
Urban Planning
Astronomy

Cap'n Web: Lightweight JavaScript RPC for Browsers and Servers

Introducing Cap'n Web, a lightweight TypeScript RPC system for browsers and servers

From Hacker News Original Article Hacker News Discussion

Cap'n Web is a new, lightweight RPC system for browsers and web servers, written entirely in TypeScript and designed to integrate smoothly with modern JavaScript environments. It offers a powerful object-capability model with bidirectional calls, promise pipelining, and a human-readable JSON serialization format, aiming to simplify building interactive web apps and microservices.

Why it matters: Cap'n Web simplifies writing networked JavaScript APIs with minimal boilerplate and modern async features, boosting developer productivity.

The big picture: It modernizes RPC for the web by supporting bidirectional calls, promise pipelining, and capability-based security without schemas or complex tooling.

Stunning stat: The entire Cap'n Web implementation compresses to under 10 kB with no dependencies, supporting HTTP, WebSocket, and postMessage.

Commenters say: Users praise the elegant bidirectional and capability-based design, note similarities and differences with other RPC systems, and express excitement about its simplicity and power despite experimental status.