Remix.run Logo
blizdiddy 4 days ago

I used bun for the first time last week. It was awesome! The built-in server and SQLite meant i didn’t need any dependencies besides bun itself, which is certainly my favorite way to develop.

I do almost all of my development in vanilla js despite loathing the node ecosystem, so i really should have checked it out sooner.

k__ 4 days ago | parent | next [-]

I tried using Bun a few times, and I really liked working with it.

Much better than Node.

However...!

I always managed to hit a road block with Bun and had to go back to Node.

First it was the crypto module that wasn't compatible with Nodejs signatures (now fixed), next Playwright refused working with Bun (via Crawlee).

Jarred 4 days ago | parent | next [-]

Playwright support will improve soon. We are rewriting node:http’s client implementation to pass node’s test suite. Expecting that to land next week.

ukblewis 3 days ago | parent [-]

That may be just the best way to drop that you are introducing a rewrite which fixes a set of bugs that affect users

koakuma-chan 4 days ago | parent | prev | next [-]

You can use Bun as package manager only. You don't have to use Bun as runtime.

iansinnott 4 days ago | parent | next [-]

Indeed! also as a test runner/lib if you're not doing browser automation. bun definitely has benefits even if not used as a runtime.

koakuma-chan 3 days ago | parent [-]

I believe Playwright worked for me with the latest Bun though

winterrdog 4 days ago | parent | prev [-]

Sure?

Does it work if I have packages that have nodejs c++ addons?

abejfehr 4 days ago | parent [-]

Why wouldn’t it? The end result of a npm install or a bun install is that the node_modules folder is structured in the way it needs to be, and I think it can run node-gyp for the packages that need it.

Cthulhu_ 4 days ago | parent | prev | next [-]

I think this is the big one that slows adoption of "better" / "faster" tooling down, that is, backwards compatibility and drop-in-replacement-ability. Probably a lot of Hyrum's Law.

drewbitt 4 days ago | parent | prev | next [-]

Deno doesn't work with crawlee either unfortunately

petralithic 4 days ago | parent | prev | next [-]

You should try Deno, they have good Node compatibility

erikpukinskis 4 days ago | parent [-]

Does it? Last I tried, several years ago, coverage of the Node APIs was not good. I wanted to send data over UDP and a lot of Node basics there were missing.

spartanatreyu 4 days ago | parent [-]

Deno's node compat is way better now.

They're still missing niche things and they tend to target the things that most devs (and their dependencies) are actually using.

But I can see they have it in their compat stuff now and it looks like it's working in the repl locally: https://docs.deno.com/api/node/dgram/

rererereferred 3 days ago | parent [-]

This page tracks Deno's compatibility with Node by running its tests: https://ffmathy.github.io/is-deno-compatible-yet/

epolanski 4 days ago | parent | prev | next [-]

Playwright has been fixed one year ago I think.

jherdman 4 days ago | parent | prev [-]

Storybook is another for me.

simantel 4 days ago | parent | prev [-]

Node also has a built-in server and SQLite these days though? Or if you want a lot more functionality with just one dependency, Hono is great.

blizdiddy 4 days ago | parent [-]

And how many dependencies does Hono have? Looks like about 26. And how many dependencies do those have?

A single static zig executable isn’t the same as a a pipeline of package management dependencies susceptible to supply chain attacks and the worst bitrot we’ve had since the DOS era.

bakkoting 4 days ago | parent [-]

> And how many dependencies does Hono have?

Zero.

I'm guessing you're looking at the `devDependencies` in its package.json, but those are only used by the people building the project, not by people merely consuming it.

PxldLtd 3 days ago | parent [-]

That doesn't prevent supply chain attacks. Dev dependencies are still software dependencies and add a certain level of risk.

arcfour 3 days ago | parent | next [-]

This is needlessly pedantic unless you are writing from an OS, browser, etc. that you wrote entirely by yourself, without using an editor or linter or compiler not written by you, in which case I tip my cap to you.

bakkoting 3 days ago | parent | prev [-]

Only in the sense that any other software on the developers' machines adds a certain level of risk.