DEV Community

Cover image for Bun vs Node.js: Everything you need to know

Bun vs Node.js: Everything you need to know

Yoav Ganbar on September 21, 2023

Written by Vishwas Gopinath On September 8th, there was fresh buzz in the JavaScript community: Bun v1.0, created by Jarred Sumner, had arrived. B...
Collapse
 
dermorzi profile image
DerMorzi

I like the fact, that you mentioned what the differences between JSC and V8 are because so people can see the engines are made for. JSC excellent for serverless and V8 for longtime running applications. This point is often missing in other articles.

One thing I miss here is the fact, that the most internal functionalities from Bun, especially things like Bun.file(), Bun.write() and Bun.serve(), also exist in Deno like Deno.serve(). I know this is not a comparison between Bun and Deno, but this has the potential to make the choice between the Runtimes easier.

Collapse
 
lebinhan profile image
Lê Bình An

I haven't take time to test our every statement in this article yet, but I immediately scroll down to this comment section because I want to say thank you and give you a unicorn for spending your time make such great, detailed and in-depth article. This kind of quality post is rare these day and I really appreciate this.

Another things is I'm still wondering about this opinion I read on an other platform:

 ...It (Bun) ignoring all the safety checks and validation to juice out every drop of performance they can get...
Enter fullscreen mode Exit fullscreen mode

I haven't playing with Bun enough to give any judge, but maybe you will know it better than me, could you try and give some feedback on this?

Collapse
 
ndaidong profile image
Dong Nguyen

Thanks for your article.

There are 2 things that keep me from switching to Bun.

  • cluster mode: this module has not been implemented yet in Bun 1.0
  • logging: winston and pino both don't work well with Bun
Collapse
 
miketalbot profile image
Mike Talbot ⭐

I guess this post covers some concerns about Bun that I feel are worth considering:

For me, the lack of Windows support makes the whole thing a non-starter.

Collapse
 
medzhidov profile image
Ilya Medzhidov

You can use WSL

Collapse
 
pozda profile image
Ivan Pozderac

This is pushing me in the direction to actually make side project with bun.

Lack of Windows support doesn't worry me at all, someone mentioned WSL - which is good alternative. I know there are win servers out there, but most of them are on unix, so really not a show stopper.

I read the comparisons from various sources, but this article actually covers a lot more than just speed comparison.

Thanks for doing the research and sharing its result with us.

Collapse
 
dmondev profile image
dmondev

Hey @Taqui, I just wanted to point out that Node does have a native test runner, since v18, and is stable since v20.
Best

Collapse
 
rjcnd105 profile image
hoejun

I'm glad bun middleware was added to qwik city!

Collapse
 
610470416 profile image
NotFound404

Seems bun will be another deno.
The naming and package system is a mass.
Fast speed is not the only concern for a language or environment.
See no bright future for me.

Collapse
 
yanakanavalik profile image
Yana

Great post, thank you!

Collapse
 
faisalamin001 profile image
Faisal Amin

Great article, thanks

Collapse
 
lewhunt profile image
Lewis Hunt

Thanks for the info, very useful!