@lazarv/rsc is a from-scratch implementation of React's Flight protocol. It is designed to remove three primary couplings found in the official react-server-dom-webpack implementation:
- Bundler Coupling: It does not require Webpack manifests or specific plugins; module resolution is handled via an abstract interface provided by the consumer.
- Environment Coupling: It uses only Web Platform APIs (
ReadableStream, TextEncoder, TextDecoder, FormData, Blob, URL), making it compatible with Node.js, Deno, Bun, Cloudflare Workers, and the browser without separate builds or polyfills. - Export Condition Coupling: It does not require the
react-server Node.js export condition, allowing it to be loaded in worker threads, custom runtimes, or embedded engines without special configuration.
It maintains full wire-format parity with react-server-dom-webpack, supporting all standard RSC types including elements, fragments, Suspense, Promises, and various JavaScript built-ins (Map, Set, Date, etc.).