Bun JS - Thoughts so far

 Hello there. Isaac here.

So over the weekend I've been trying out Bun for a school project (a simple Koa API server from scratch). I didn't really have a project on hand I could benchmark against to compare Bun to Node. Any speed difference I felt could've just been placebo, really.

I do enjoy using Bun though even if we disregard the speed part, but I wouldn't say that Bun is good enough to warrant replacing my existing projects using Node. Most of the pros I experienced boils down to convenience. Bun has many features bundled with it that would've taken some time to install using Node. Below is a list of said features and packages I would've needed to install in Node:

  1. Running TypeScript files
    1. ts-node
    2. typescript (Ended up installing it anyway for linting)
  2. Hot reload
    1. nodemon
  3. Running tests
    1. jest (I've only used mocha before, but I assume it's more similar to jest)
  4. Password hashing
    1. argon2 (Never used this either)
    2. bcrypt
  5. Watching tests (Never attempted to do this before so I don't know if anything else is needed)
  6. Package manager
    1. nvm (and npm by extension)

...and that's about it. The project doesn't have a front-end so I can't really test out bundling and JSX. Maybe in the future.

To reiterate, I don't yet have a reason to bother switching to it for official work. None of my work projects have Node taking significant time to run (no front-end tests, and the back-end isn't using Node anyway). While it does save quite a bit of time I would otherwise have to take setting up the aforementioned dependencies, I don't set up fresh projects that often anyway. Plus I'd rather not waste time fixing compatibility issues with Node, however rare they may be.

I am planning on using Bun until it becomes annoying to use (like Deno pre-npm days), if ever.

Comments