Developer launches @rabbx/sirv, a zero-dependency static file middleware for edge runtimes
A developer has released @rabbx/sirv, a rewrite of the popular sirv static file middleware designed natively for edge and modern runtimes including Bun, Deno, Node.js, and Cloudflare Workers. Unlike the original sirv, which was built for Node.js and requires polyfills on other runtimes, @rabbx/sirv uses native Web APIs such as Request, Response, and ReadableStream from the ground up. The library introduces a composable plugin system with setHeaders and transform hooks, enabling use cases like Markdown-to-HTML conversion in roughly 20 lines of code. Leveraging zero-copy streaming on Bun, the middleware reportedly achieves around 95,000 requests per second with 0.3ms latency. The project is MIT-licensed, has zero dependencies, and is described as production-ready.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in