Hey devs, I got tired of ws + isomorphic-ws + cross-fetch + polyfills just to open a socket that works everywhere.
So I wrote @rabbx/ws: a 9KB WebSocket client/server that runs on Node, Bun, Deno, and Cloudflare Workers with the same code. Zero dependencies. Web standard APIs only.
Why:
9KB vs 1.2MB - ws pulls 14 deps. socket.io-client is 85KB gzipped. This is 9KB total.
Zero deps - No debug, no safe-buffer, no ultron. Just EventTarget and WebSocket.
Same code everywhere - new RbxSocket(url) works in Node 20, Bun, Deno, Workers. No if (isBrowser) branches.
Cold starts matter - On Cloudflare Workers, importing ws costs 120ms. This costs 8ms. Thatβs the difference between 50ms and 170ms TTFB.
star us help us grow
github
For further actions, you may consider blocking this person and/or reporting abuse
