![](https://thunderbrains.in/wp-content/uploads/2024/04/ThunderBrains.jpg)
Bun 1.0 is finally here.
Let’s get our hands dirty and explore the possibilities that Bun is bringing to the table. I am also excited to test out some of the promises Bun is making around performance. Is it really that fast?
What is Bun?
Bun is an all-in-one toolkit to build and run Javascript and Typescript applications. It’s the Swiss knife that can do everything: run, build, test, debug, transpile, test. And the best part about it is that it’s really fast
Install Bun
Let’s follow the instructions on Bun’s Homepage to install it on our system.
Or simply run: curl -fsSL https://bun.sh/install | bash
Currently, bun is supported only on macOS and Linux systems.
Bun as a package manager
The easiest way to get started using bun is by replacing your existing package manager npm or yarn with bun. You will see instant benefits and much faster install speed.
It works with any javascript project. If you have a package.json file, you can start using bun install and drastically improve the speed of installing and managing packages.
Installing a package
Running npm install express took 5s while bun install express did it almost 10 times faster – in 0.6s.
![](https://thunderbrains.in/wp-content/uploads/2024/04/image-2.png)
![](https://thunderbrains.in/wp-content/uploads/2024/04/image-3.png)
Bun Runtime
Bun is a drop-in replacement for NodeJS that is designed for speed.
Let’s put this to a test by running a NodeJS Fullstack app with Bun, and do some load testing to see which one is faster.
We will use this Fullstack app from Prisma templates. It has a Rest API built with Express on the backend, and a NextJS app on the frontend.
Let’s clone the repository git clone [email protected]:prisma/prisma-examples.git –depth=1
Conclusion
I am quite impressed by the performance of Bun. What’s also noteworthy, is that there is nothing much new we have to learn about Bun in order to start using it. It’s a great drop-in replacement for NodeJS, and it is supposed to work as-is for most use cases