Bun - a Node.JS-compatible JavaScript runtime (using JavaScriptCore), package manager, bundler, test runner and all-in-one toolkit has finally a production-ready version - Bun 1.0!
We did get SVR.JS working in Bun, beginning with SVR.JS 3.0.0. But Bun changed fast, and so older SVR.JS versions won’t work properly with newest versions of Bun. We have tested Bun 1.0 (it introduced native IPC not present in Bun 0.x), patched SVR.JS and released SVR.JS 3.9.4 and SVR.JS 3.4.32 LTS (older versions displayed TypeErrors with Bun 1.0).
Bun support is still experimental though, so you may run into problems with SVR.JS startup (“There was an unknown error with the server.“ errors; master will shut down but worker will be active) or see “There was a problem when handling SVR.JS worker! (from master process side)“ warnings, because Bun doesn’t support native clustering yet (SVR.JS shims missing cluster module; the shim may break with newer versions of Bun making SVR.JS reliability suffer).
If you run into issues running SVR.JS on Bun 1.0, try using Bun 0.8.1 (latest developement version; it works with clustered SVR.JS and it’s shim) or Node.JS (SVR.JS is designed for it).
You may also create this startup script for SVR.JS running on Bun 1.0 like this (multiple clustering will not work on SVR.JS running on Bun 1.0, so SVR.JS will fail to start new worker in case the previous ones hung up, but SVR.JS will at least start new worker in case if all of the workers had crashed):
Read More