TRANSCRIPTEnglish

Bun in 100 Seconds

2m 48s571 words85 segmentsEnglish

FULL TRANSCRIPT

0:00

Bun.JS, a megaast JavaScript runtime and

0:03

tool chain that was built by someone who

0:04

woke up one day, looked at their node

0:06

modules folder, and chose violence. The

0:08

JavaScript programming language was

0:10

originally designed in 1995 for

0:12

front-end scripting in web browsers,

0:14

mostly to annoy people with pop-up

0:16

windows and targeted ads. But one

0:18

fateful day in 2009, it escaped the

0:20

browser, got a back-end job, and evolved

0:22

into the most cursed tool chain in

0:24

software history with a basic stack

0:26

including Node.js JS as a runtime, mpm

0:28

as a package manager, Webpack for a

0:30

bundler, just for testing, Babel for

0:32

transpiling, and a graveyard of config

0:34

files nobody understands. Then in 2021,

0:37

Bun came along and said, "What if the

0:39

runtime could do everything and do

0:41

everything faster?" The JavaScript world

0:43

agreed and now Bun powers tools like

0:45

Claude Code, serverless functions on

0:47

cloud platforms, and the local dev

0:49

environments for millions of soy devs.

0:51

At its core, Bun is a JavaScript runtime

0:53

like Noode.js, JS, but with an extreme

0:55

focus on performance, which they

0:56

achieved by swapping out C++ for Zigg

0:59

and Chrome's V8 engine for JavaScript

1:01

Core, the same engine used by Safari.

1:04

Starting from scratch has allowed it to

1:05

throw up some impressive Trust Me Bro

1:07

benchmarks. But it's more than just a

1:09

runtime. It replaces your bundler, so

1:11

you can write TypeScript and JavaScript

1:13

without any config nightmares. It

1:15

replaces your testing frameworks and

1:16

package managers, and it even has

1:18

built-in database drivers to work with

1:20

SQL, Reddus, and S3 buckets in the

1:22

cloud. And it does all of this from a

1:24

single binary while maintaining

1:26

compatibility with the Node.js ecosystem

1:28

is so instead of assembling a tool

1:29

chain, you just run bun and move on with

1:31

your life. To get started, we can

1:33

install it using a single command, then

1:35

open up the terminal and run bun init to

1:37

start a new project. And that gives us a

1:39

TypeScript file where we can start

1:40

writing some code. Then to run it, we

1:42

can run bun run and we can auto restart

1:44

on changes with the watch flag. No need

1:46

to mess with a transpiler or extra

1:48

dependencies. But now we want to build a

1:50

web app. And instead of installing

1:52

ExpressJS, we just use the built-in bun

1:54

HTTP module to create a basic web

1:56

server. That was easy, but now we want

1:58

to store some data in SQLite. You simply

2:00

import the database module and start

2:02

writing queries. Over the next few days,

2:04

our app goes viral with millions of

2:06

users. The database gets bogged down.

2:08

So, let's implement an in-memory cache

2:10

with Reddus. Like before, just import

2:12

the Reddus module and we're up and

2:14

running without any thirdparty

2:15

dependencies. But wait a minute, I still

2:17

love all these packages I have in this

2:18

package. JSON file. Well, instead of

2:20

running npm install, I can run bun

2:22

install to install them 25 times faster.

2:25

And we can even run executables on npm

2:27

with the bunks command. And finally, we

2:29

might as well test our code, which we

2:31

can do with the built-in test runner,

2:33

but which like everything else in Bun is

2:35

extremely fast. This has been Bun in 100

2:37

seconds. If you want to see more videos

2:39

like this, let me know what you want to

2:40

learn about next in the comments. Thanks

2:42

for watching, and I will see you in the

2:44

next one.

UNLOCK MORE

Sign up free to access premium features

INTERACTIVE VIEWER

Watch the video with synced subtitles, adjustable overlay, and full playback control.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.