Bun 1.0 is here
The new performance focus wave? Yes, I hope
Published on
My reaction
I’m just speechless 😮
You can obtain a lot at basically zero cost.
It’s fast as ⚡, 🔥, 🚄, 🚀
What is Bun?
They describe it perfectly on their website.
Develop, test, run, and bundle JavaScript & TypeScript projects—all with Bun. Bun is an all-in-one JavaScript runtime & toolkit designed for speed, complete with a bundler, test runner, and Node.js-compatible package manager.
— bun.sh
Why is important?
Node.js has been with us for many years now. As much as they try to improve it, its creator also decided to create an alternative that tries to solve all its problems. I’m talking about Deno.
I hope that this will be the starter of a new era of optimized runtimes.
Also for other languages.
Python 3.11 was a blast when talking about performance improvements, but now Bun raises the level for every other language.
Some quick info from the video
- It’s fully compatible with vanilla Node.js.
- A simple “hello world” program
console.log("Hello world");
takes 8 ms in Bun, in Node.js it takes 32 ms. - Support for CommonJS and ESM
- Hot reloading with
bun --hot server.ts
- Plugin API—there is a plugin to import Rust files 🦀
Bun.file
to lazy load files- Writes 3x faster than Node.js
- Reads 10x faster than Node.js
Bun.serve
- Can handle 4x number or requests
- All the mainstream frameworks and tools are working out of the box
- Next
- Remix
- Vite
- Astro
- …
- It is also a package manager that install 29x faster than npm and 17x than pnpm
bun:test
module
The outcome for me
I need to test it as soon as possible and try to replace Node. No more transpiling and faster execution. I can drop some dependencies.
It seems too good to be true.
What do you think about this release?