Bun: Bun's built-in features

The thing I like the most about Bun is its extensive set of built-in features that improve the developer’s life.

Let me mention a few, so you can quickly see if there’s something that piques your interest.

  • It’s 100% compatible with Node.js, this means any Node package works with Bun too. Not every API is implemented (yet), but the most common ones work perfectly in both Node and Bun. Works with node_modules and package.json, so npm i and bun i all install in that folder. You can even mix and match npm and bun operations, no problem.
  • It has TypeScript support built-in, no additional compile step required
  • It has JSX support built-in, compiled using React
  • Has built-in watch mode and hot reloading
  • Has built-in testing helpers
  • Did I say it’s fast?
  • …and much more

It also comes with a ton of utility features:

  • Bun.password provides password hashing and verification utilities
  • SQLite library built-in
  • Easy to use filesystem APIs
  • Easy to use networking APIs

I plan to add more content related to this in this section, but for now we’ll stop here, and we’ll pick up Bun again when we’ll talk about Hono, an excellent HTTP server based upon Bun.

We did just a brief intro enough to give you an idea of Bun and equip you with the ability to run Bun projects.

Bun has a lot more to offer. I encourage you to go to https://bun.sh/docs and take a good look around.

Lessons in this unit:

0: Introduction
1: Installing Bun
2: Running your first Bun program
3: Working with packages
4: ▶︎ Bun's built-in features
Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. Launching May 21, 2024. Join the waiting list!