For information, just catching up with what's happening in the world of Bun - the alternative JavaScript server that is meant to be node.js compatible but with some significant upgrades and improvements.
They released v1.2 not long back but today was my first chance to give it a go.
Impressive. I'm running a clean dev version of Node-RED using Bun, all seems to be working. At least UIBUILDER and the SQLite nodes all seem to be working anyway.
Much Faster Startup & Execution: Bun is written in Zig and optimized for performance, often running JavaScript and TypeScript significantly faster than Node.js.
Check out their benchmarks. Loads of elements are faster and that translates to major improvements to other libraries such as ExpressJS.
Faster Package Manager: bun install is much quicker than npm or pnpm since it fetches and installs dependencies in parallel.
Built-in Features
Bundler, Transpiler, & Runtime in One: No need for additional tools like Webpack, Babel, or esbuild—Bun handles bundling and transpiling out of the box.
Native TypeScript Support: Runs .ts files directly without requiring ts-node or manual compilation.
Web APIs Support: Provides built-in support for fetch, WebSockets, and ReadableStream, making it more browser-like.
Integrated CommonJS/ESM: You can use both.
New standard libraries: Built-in support for SQLite & Postgres, soon for MySQL. Some others too such as built-in UDP.
Simpler & More Efficient
Better FS & Network Handling: Bun uses optimized system calls for file and network operations, reducing overhead.
Native JSX/React Support: Handles JSX transformation without extra dependencies.
Unified API: Includes a built-in test runner, SQLite database driver, and more, reducing dependency bloat.