5 ms·
So what's the difference between Deno and Bun? Are they just drop-in node replacements?
by gosukiwi 4y ago
So what's the difference between Deno and Bun? Are they just drop-in node replacements?
- richeyryan 4y agoBoth Bun and Deno aim to be batteries included, shipping Typescript and a test runner etc., by default. Deno initially aimed to diverge from Node and conform to the web platform as much as possible, i.e. use ES Modules and Web APIs over custom APIs. They've moved back towards Node over the last while to get more adoption. Bun broadly aims to be Node compatible, but they seem to try to stick to Web APIs too. Bun seems to value performance as a primary concern, with start-up time being an often-discussed metric. The value being improvements to local developer toolchains or fast starts in edge environments. Deno seems to value developer experience, with the goal being an overall better Node. They also benchmark performance against Node and seem to be faster in some places but not others. Finally, Bun uses the JavaScriptCore engine from Webkit, which it seems can be faster than V8 in some situations. This is the perspective of a relatively detached observer who has played with both a little and kept up with their development somewhat but hasn't done a serious project with either.
- Jarred 4y agoBun is an all-in-one JavaScript/TypeScript bundler, runtime, package manager, and transpiler focused on being being fast and a drop-in replacement for Node. Much of it is written from scratch in Zig. Bun also adds many runtime APIs like a builtin websocket server, FFI, Bun.mmap, SQLite, Bun.Transpiler and more. `bun dev` let’s you use bun’s transpiler for frontend code `bun install` is an npm client you can use with Node and it installs packages 20x - 100x faster than npm/yarn/pnpm `bun run` let’s you run package.json scripts really fast (I work on Bun)