New top story on Hacker News: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol
Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol
12 by brian_meek | 0 comments on Hacker News.
Last week Cloudflare released Cap'n Web [1], a schema-free capability-based RPC protocol. I built capn-rs this week - a Rust implementation with full wire protocol compatibility. Links: GitHub: https://ift.tt/GHnuPgx Crates: https://ift.tt/1JgB92s API docs: https://ift.tt/yTdQBVY What's working: Wire compatibility verified via integration tests against TypeScript reference Multi-transport: HTTP batch, WebSocket, WebTransport (HTTP/3) Complete IL (intermediate language) expression evaluator Promise pipelining with dependency resolution Comprehensive test coverage The interesting design challenge was mapping Cap'n Web's record-replay .map() semantics to Rust's type system while maintaining ergonomic APIs. Cap'n Web records operations on placeholder values to build execution plans - in Rust this became a clean builder pattern with type-level guarantees. Built this as an experiment with Claude Code for porting complex protocols. The AI handled mechanical translation well, but architectural decisions (especially around async/await patterns and lifetime management) required human judgment. This is early days - I'd especially appreciate feedback on API ergonomics and any edge cases I might have missed. Also happy to discuss the protocol design or the AI-assisted development experience. [1] https://ift.tt/2KCyn8E
12 by brian_meek | 0 comments on Hacker News.
Last week Cloudflare released Cap'n Web [1], a schema-free capability-based RPC protocol. I built capn-rs this week - a Rust implementation with full wire protocol compatibility. Links: GitHub: https://ift.tt/GHnuPgx Crates: https://ift.tt/1JgB92s API docs: https://ift.tt/yTdQBVY What's working: Wire compatibility verified via integration tests against TypeScript reference Multi-transport: HTTP batch, WebSocket, WebTransport (HTTP/3) Complete IL (intermediate language) expression evaluator Promise pipelining with dependency resolution Comprehensive test coverage The interesting design challenge was mapping Cap'n Web's record-replay .map() semantics to Rust's type system while maintaining ergonomic APIs. Cap'n Web records operations on placeholder values to build execution plans - in Rust this became a clean builder pattern with type-level guarantees. Built this as an experiment with Claude Code for porting complex protocols. The AI handled mechanical translation well, but architectural decisions (especially around async/await patterns and lifetime management) required human judgment. This is early days - I'd especially appreciate feedback on API ergonomics and any edge cases I might have missed. Also happy to discuss the protocol design or the AI-assisted development experience. [1] https://ift.tt/2KCyn8E
New top story on Hacker News: Show HN: Cap'n-rs – Rust implementation of Cloudflare's Cap'n Web protocol
Reviewed by zero news
on
September 30, 2025
Rating:
No comments: