We replaced Node.js with Bun for 5x throughput
1–10 of 36 posts
Re: We replaced Node.js with Bun for 5x throughput
#2I didn't know that. So Bun is basically a whole runtime + framework all in one with little to no deployment headaches?
Re: We replaced Node.js with Bun for 5x throughput
#3Re: We replaced Node.js with Bun for 5x throughput
#4Re: We replaced Node.js with Bun for 5x throughput
#5“Compiled executables reduce memory usage and improve Bun’s start time.
Normally, Bun reads and transpiles JavaScript and TypeScript files on import and require. This is part of what makes so much of Bun “just work”, but it’s not free. It costs time and memory to read files from disk, resolve file paths, parse, transpile, and print source code.
With compiled executables, you can move that cost from runtime to build-time.”
https://bun.com/docs/bundler/executables#deploying-to-produc...
Re: We replaced Node.js with Bun for 5x throughput
#6>Next: the runtime itself. Bun has a bun build --compile flag that produces a single self-contained executable. No runtime, no node_modules, no source files needed in the container. I didn't know that. So Bun is basically a whole runtime + framework all in one with little to no deployment headaches?
Deno also provides the same functionality, but with a smaller optimized binary.
Appreciate Bun helping creating healthy competition. I feel like Deno falls under most people's radar often. More security options, faster than Node, built on web standards.
Re: We replaced Node.js with Bun for 5x throughput
#7>Next: the runtime itself. Bun has a bun build --compile flag that produces a single self-contained executable. No runtime, no node_modules, no source files needed in the container. I didn't know that. So Bun is basically a whole runtime + framework all in one with little to no deployment headaches?
Re: We replaced Node.js with Bun for 5x throughput
#8Maybe I'm doing something wrong but I scoured docs and online and asked multiple AI agents to no avail.
Re: We replaced Node.js with Bun for 5x throughput
#9>Next: the runtime itself. Bun has a bun build --compile flag that produces a single self-contained executable. No runtime, no node_modules, no source files needed in the container. I didn't know that. So Bun is basically a whole runtime + framework all in one with little to no deployment headaches?
This (single executable) is available in node.js now too as SEA mode.