- Very cool idea which makes a lot of sense. Bun provides more (eg db drivers) but the DX is certainly a big part of its appeal.
For reference, the main author of Nub is Colin McDonnell who created Zod and even worked at Bun at some point.
by eyelidlessness
1 subcomments
- I’m surprised to see this using a `--require` hook (rather than `--import`). Maybe something’s changed significantly since I was looking into building some similar functionality… but it makes me wonder about nuances in nub’s ESM support.
(When I was investigating this it was very early in Node’s `--import` story, but there were several edge cases with the more common ESM-to-CJS approaches that I wanted to address. Most were probably exceedingly niche concerns, but I’d expect top-level await to affect a meaningful subset of users.)
by ssalbdivad
1 subcomments
- Just merged a PR migrating our entire monorepo to nub.
0 issues, ridiculously fast.
by BrunoBernardino
0 subcomment
- This is _very_ interesting, thanks for building and sharing it, Colin!
I've got a couple of decent-sized products running on Deno (and I've been a fan since it came out, not so much since 1.0 and 2.0, but still feel it's better than Node), but Node has been catching up and Deno has slowed down, so this might be the "compatibility middleware" that'll get me to move things back to Node.
Will keep a close eye on it.
by Reuben_Santoso
0 subcomment
- I dont completely get it yet. but I like it when things run faster ;)
- Hasn't Node been able to run TypeScript for a couple of versions? Why's the transpiler needed?
- I saw this on twitter and loved it, such a good move on your part Colin. Hope the project picks up tons of steam!
by ivanjermakov
2 subcomments
- Respect for embracing existing tech instead of rewriting a worse version of it. Wonder where we would be today if all alternative-building effort went to Node instead (with proper leadership).
- I actually really like this! Great choices all around.
- Does this mean, that the full node compatibility purely depends on oxc for transpiling? So oxc compatibility = nub compatibility?
by austin-cheney
1 subcomments
- The readme says Websockets support is native from Node 22, except Node does not have a native Websockets library. Their link for Websockets standard goes to MDN, which is fine except that only describes the WHATWG user interface and nothing about the protocol or how Websockets works.
It feels like this is missing something or using a nonnative library as a supplemental addition.
by gorjusborg
7 subcomments
- Very smart. You can't lose all your customers for vibe-coding a migration to Rust if you are already written in Rust ;)
- I didn't even click on the link. I just came to give the author a hat-tip on the project name. Well played.
- Love the idea, learning a lot of interesting things about node hooks by reading docs and some code
- > TypeScript-friendly resolution: extensionless imports, tsconfig.json#paths
I’m wondering how that works. Deno has very complicated import resolution, so building my own import resolver to be compatible with it is a bit of a pain. (This is for a custom lint-like tool.)
- Am I expected to be able to run this in production on the backend, or do I still need to transpile and bundle? Do we expect the performance and memory overhead to be negligible. What would be the expectations on terms of added attack surface?
- Will you be able to integrate aube updates after vendoring it? https://github.com/nubjs/nub/pull/81
- There's also the option of using Jiti
https://github.com/unjs/jiti
It would add an extra dependency though
by bookernath
1 subcomments
- Nice, I think this fills a niche. Does it work on cloudflare workers?
- This looks fantastic.
One suggestion, for package management you should just wrap pnpm, my desire to move to anything else is nil.
- I know some people who pronounce n00b like nub, which makes this sort of funny to me. (Maybe it's even intentional?)
- big fan of nub and nubnub the mascot. Seriously though, this is a great project. I'm super intruiged and been using for the past week or at least since it released
by montroser
1 subcomments
- Nice. Can we get `nub --compile` up in there like Bun has?
by vivzkestrel
0 subcomment
- - eli 5 : what is so great about this
- what's wrong with bun? And how is this better?
- [flagged]
- [dead]
- nice ! does this work on docker containers ?