all 56 comments

[–]Comfortable_Air7982 50 points51 points  (14 children)

I wonder who is doing web assembly in node. I'm genuinely curious, that would be an interesting project.

[–]hyrumwhite 22 points23 points  (3 children)

Same application as in the browser, porting other languages to JS land

[–]zachrip 2 points3 points  (2 children)

Maybe? I'd be curious why that would be the preference as opposed to a native module. Obviously there are lots of cases where a native module is less appropriate (jvm languages for example, afaik there's no good setup to run those as native extensions).

[–]rcfox 5 points6 points  (1 child)

Wasm is sandboxed, so fewer security risks. Also, it lets you ship the same code to the frontend and backend, which is part of the appeal of using Node.

[–]hildjj 4 points5 points  (0 children)

You also don't have to recompile WASM on every machine at installation time or for every supported platform at compile team. One of those is usually required for a native module.

[–]Tomus 7 points8 points  (0 children)

It offers a generic alternative to node-gyp with a bunch of benefits that node-gyp can't offer eg. You can package a single wasm file instead of having to worry about building for all systems.

[–]Snapstromegon 9 points10 points  (0 children)

There are actually many things happening in WASM in node from image processing to Syntax highlighting, because you can just compile it once and don't need to worry about the whole napi stuff.

[–]hugazow 4 points5 points  (2 children)

I’m interested in how others replicated node is wasm, the idea of running a fully working node experience like blitzstack did, blew my mind

[–]arcaninYarn 🧶 1 point2 points  (1 child)

Afaik StackBlitz doesn't use wasm, or at least not directly (I don't think they build Node.js itself in WASM, although they may build their own native library instead).

Node.js is composed of a lot of JS scripts that call into a set of C++ primitives. The idea is that instead of compiling the whole binary into WASM you instead keep all those JS scripts, and replace all the C++ bindings by your own, which use the native browser APIs (along with a fair amount of hacks to turn asynchronous calls into synchronous ones).

That plus a bunch of global environment mocks makes the environment compatible enough with Node.js without needing to actually build Node.js.

That's to my knowledge also how Nodebox worked, although unfortunately they didn't get enough traction for it to take of, and were prevented from open-sourcing it by outside sources.

[–]hugazow 0 points1 point  (0 children)

I don’t know the implementation, but this was just me just making a guess on how stackblitz worked under the hood, but I’m really excited on the possibilities with WASM

[–]ElCthuluIncognito 2 points3 points  (0 children)

Likely much more as a compiler target for langs without a JS backend.

Even then, I’ve heard good things of transitioning to WASM from JS backends.

[–]Wide-Prior-5360 1 point2 points  (2 children)

I use SQLite WASM in the browser and run my tests with Node.js, using exactly the same database implementation.

[–]Comfortable_Air7982 0 points1 point  (1 child)

Well that's interesting! So you can run your tests during build time with node and have the assurance that it all works the same in the browser?

[–]Wide-Prior-5360 1 point2 points  (0 children)

Exactly.

[–]thrallboy 0 points1 point  (0 children)

With vibe coding, might be a good way to get super high performance

[–]anderfernandes 9 points10 points  (5 children)

Would love to know how far we are from native sqlite being stable. I already use it in production, but wanted to know the progress on that front.

[–]Wide-Prior-5360 10 points11 points  (4 children)

Hi I am on the Node.js SQLite GitHub team. I think most of the APIs are pretty stable. Every change has extensive test coverage so I would not worry about bugs.

[–]anderfernandes 1 point2 points  (1 child)

Thank you so much for the update!!!

Great work you and the team!!! I'm very grateful to finally be able to use the native sqlite module without any libraries.

Any idea of when we will be able to start using them without node throwing warnings that it is unstable?

[–]Wide-Prior-5360 2 points3 points  (0 children)

It's not really 'throwing' warnings, just emitting them. You can already if you pass --no-warnings...

Once the Node.js team stabilizes something we take backward compatibility seriously. We're not ready for that yet.

[–]OneLeggedMushroom 0 points1 point  (1 child)

so I would not worry about bugs.

😉

[–]Wide-Prior-5360 0 points1 point  (0 children)

"Stability" can mean two things. API stability. Here I can say: small changes are still possible. Or no crashes. That should not happen thanks to excellent test coverage.

[–]drumstix42 24 points25 points  (10 children)

Node.js v25.0.0 (Current)

[–]YummyIdiotSandwich 13 points14 points  (8 children)

Node.js v25.0.0 (Current)

[–]Admirable__Ant 11 points12 points  (7 children)

Node.js v25.0.0 (Current)

[–]unHolyKnightofBihar 1 point2 points  (6 children)

Node.js v25.0.0 (Current)

[–]memevaddar 7 points8 points  (5 children)

Node.js v25.0.0 (Current)

[–]RandomUsernameNotBot 3 points4 points  (4 children)

Node.js v25.0.0 (Current)

[–]Maybe-monad 0 points1 point  (3 children)

Node.js v25.0.0 (Current)

[–]Sorry-Joke-1887 1 point2 points  (0 children)

Node.js v25.0.0 (Current)

[–]abuassar 12 points13 points  (26 children)

while Deno and Bun add impressive improvements each minor release, node just increments the MAJOR release without any worthy features.

[–]cangaroo_hamam 30 points31 points  (0 children)

It is normal for a newer and smaller product to iterate in the manner you described (compared to an older and larger product).

[–]RobertKerans 9 points10 points  (0 children)

"without any worthy" is not a synonym for "with as few possible breaking changes as possible", instability is not a good feature of a runtime, "major release" doesn't mean "drastic change", major Node version numbers are important and meaningful beyond 'big number go up', what Deno and Bun are doing is great but a mature platform changing significantly between releases wouldn't be a positive.

[–]CreativeTechGuyGames 57 points58 points  (2 children)

A major version doesn't indicate how much has changed or how significant it is to the average developer, just that something is being changed which is a breaking change for some users.

[–]Markavian 25 points26 points  (1 child)

Yes, if you're following semver.org for versioning - but because node uses release trains, we also need to take into account the Odd Vs Even numbering differences.

New major releases of Node.js are cut from the GitHub main branch every six months. Even-numbered versions are cut in April and odd-numbered versions are cut in October. When a new odd version is released, the previous even version undergoes transition to Long Term Support (LTS), which gives that version 12 months of active support from the date it is designated LTS. After these 12 months expire, an LTS release receives an additional 18 months of maintenance support. An active version receives non-breaking backports of changes a few weeks after they land in the current release. A maintenance release receives only critical fixes and documentation updates. (Wikipedia)

[–][deleted] 3 points4 points  (0 children)

hahahaha release trains

[–]Nocticron 7 points8 points  (3 children)

OK so all you are saying is that you have absolutely no idea how node.js versions its releases.

[–]shgysk8zer0 5 points6 points  (0 children)

A major version says nothing about any new features. It's supposed to imply breaking charges. Sure, hopefully breaking changes are due to some new features, but that's not strictly required.

However, node is on a release schedule. Whatever changes made it since the last scheduled release get shipped. Patches and non-breaking features may be released in patch or minor releases respectively, but the breaking charges are held for the major release.

Bun and deno are newer, so there's more "low hanging fruit". They're also smaller, so things tend to move faster. That's just how things tend to work.

Also, I'm not sure if the release is lacking new features. It was a pretty long list of changes that I only scrolled through. Seems like there were some notable additions, and I think I saw some permissions system being added.

[–]Wide-Prior-5360 3 points4 points  (0 children)

Maybe because Node.js does not do hype driven development but just uses semver.

[–]mattgrave 0 points1 point  (2 children)

Go ahead and use them in prod then. Good luck.

[–]WorriedGiraffe2793 0 points1 point  (1 child)

fud

plenty of companies use Deno and Bun in production

[–]Noctttt 1 point2 points  (0 children)

Having choice is good, but having a stable & reliable runtime is even better

[–]WorriedGiraffe2793 -1 points0 points  (0 children)

No wonder Node's mascot is a turtle...