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:
- Running TypeScript files
- ts-node
- typescript (Ended up installing it anyway for linting)
- Hot reload
- nodemon
- Running tests
- jest (I've only used mocha before, but I assume it's more similar to jest)
- Password hashing
- argon2 (Never used this either)
- bcrypt
- Watching tests (Never attempted to do this before so I don't know if anything else is needed)
- Package manager
- 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
Post a Comment