The Bun Revolution: JavaScript’s Next Leap

Wesley Huber
3 min readOct 28, 2023

--

If you haven’t heard about Bun you’re missing out! It might be the next biggest thing we use as Javascript developers, but will it stand the test of time?

Bun is the FASTEST Javascript runtime & toolkit that can be used in place of NodeJS, and completely revolutionizes the way we work in javascript.

Bun can be used in any Typescript or Javascript project with any framework like React, Vue, Svelte, e.t.c.

Bun also has it’s own APIs that can start a wesberver, read and write to files, compile, hash and more. To see it all check out the Bun docs here.

We’ve been utilizing an unfunded open-source project as a basis for building large-scale software

This comment on a great youtube video about Bun exposes the huge opportunity in Javascript development we had all been ignorant of, that the Bun team jumped on.

“Until days ago, I had no idea Node was such a small unpaid team. How can Node carry so many corporations on its back, how can Node be such a core dependency to the web as we know it, and companies aren’t pouring money into its continued development?”

Node.js is open-source while Bun was recently funded $7 million dollars

Bun is so much faster than NodeJS. Why is that?

The team’s core focus when building bun was performance.

To get into the tech, Bun uses Apple’s JavaScriptCore, where Node uses Google’s V8 engine. They also utiltize a low-level programming language called Zig and coded everything with a performance-based mind frame.

What are the concerns with Bun?

One big concern is that Bun is really Jarred Sumner’s project as he is by far the top contributor. It is not as much of a team effort as it is largely built by one individual.

Where you can see NodeJS is more of a true team effort:

NodeJS has stood the test of time, being used and popularized in the last 10–15 years. The creation of Bun will certainly inspire the NodeJS developers to optimize the performance of Node.

With Bun being a funded startup, they will eventually want to capitalize on their software somehow. Time will tell to see how successful and widely-used Bun will become.

I want to use Bun right now!

Great! You can start using Bun right now in any project where you are using NodeJS. It will work out-of-the-box. You just need to install it:

curl -fsSL https://bun.sh/install | bash

Now you can use bun in place of npm

npm run dev
bun run dev

However, if you’re on an M1 Macbook like I am, this might error like this:

dyld[11834]: Symbol not found: _ubrk_clone
Referenced from: /Users/youruser/.bun/bin/bun
Expected in: /usr/lib/libicucore.A.dylib
zsh: abort bun run

This can be resolved by installing Bun 1.0.2

curl -fsSL https://bun.sh/install | bash -s "bun-v1.0.2"

Check out the Bun docs for more. Happy coding!

Peace,

-Wes

--

--