frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

https://github.com/nubjs/nub
100•colinmcd•2h ago

Comments

colinmcd•2h ago
Colin here, creator of Nub. I’ve had the general shape of this in mind for years. Nub runs your code with stock `node`, augmented with a `--require` preload hook[0] that adds a transpiler (oxc-powered, packaged as a Node-API add-on), registers a module resolution hook[1], and injects polyfills as needed for APIs like `Worker`, `Temporal`, etc. All purely additive, your code ultimately runs using Node’s actual engine & stdlib implementations.

[0] https://nodejs.org/api/cli.html#-require-module

[1] https://nodejs.org/api/module.html#moduleregisterhooksoption...

awaseem•1h ago
I saw this on twitter and loved it, such a good move on your part Colin. Hope the project picks up tons of steam!
eyelidlessness•18m ago
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.)

ssalbdivad•2h ago
Just merged a PR migrating our entire monorepo to nub.

0 issues, ridiculously fast.

daavin•1h ago
You merged a PR migrating a shared monorepo using this within an hour of it being posted?
colinmcd•23m ago
It entered public beta last week, but just getting on HN now.
bookernath•1h ago
Nice, I think this fills a niche. Does it work on cloudflare workers?
colinmcd•1h ago
Cloudflare Workers is a different runtime and has its own toolchain around it. Nub could theoretically support it when executing files (spawn `wrangler dev` instead of `node` if wrangler.toml is detected or something) but really I'm focused on making the Node.js experience as good as possible.

The other pieces of the toolkit could absolutely be used: package manager, script runner, package runner. Works with anything that implements the Node module resolution algorithm (actually Yarn PnP also works out of the box...).

GL26•1h ago
nice ! does this work on docker containers ?
colinmcd•1h ago
Yep, full support on macOS, Linux, Windows. No official image yet (I'll start on this now) but you can get started with something like this.

  FROM node:26-slim
  RUN npm i -g @nubjs/nub
Works with any Node version down to 18.19 but recommend 22.15+ for best performance (that's when synchronous registerHooks was introduced[0])

[0] https://nodejs.org/api/module.html#moduleregisterhooksoption...

sgarrity•1h ago
I didn't even click on the link. I just came to give the author a hat-tip on the project name. Well played.
colinmcd•1h ago
Thanks :) Highly recommend clicking the link too!
gorjusborg•1h ago
Very smart. You can't lose all your customers for vibe-coding a migration to Rust if you are already written in Rust ;)
Zambyte•1h ago
They'll get bought out by OpenAI and convert the project to Zig
ivanjermakov•54m ago
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).
hungryhobbit•19m ago
Fundamentally you can't fix a lot of things with this approach.

Simple example: Node is the only serious OSS software I know of that has no way to document its config (in the config file itself). It's moronic! The Node people just adopted JSON without a thought, and then refused to consider any alternatives (even "JSON with comments").

When an organization digs into bad decisions, the only way to fix them is to start something new. The entire JS ecosystem will never have documentation on its config as long as everyone keeps building on top of Node.

(And there are many other issues like this in the Node ecosystem; the utter absurdity of not being able to document config is just my personal pet peeve.)

kandros•48m ago
Love the idea, learning a lot of interesting things about node hooks by reading docs and some code
montroser•29m ago
Nice. Can we get `nub --compile` up in there like Bun has?
colinmcd•24m ago
Coming very soon!
skybrian•17m ago
> 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.)

John Carmack on the mistakes around Quake that ruined id software

https://twitter.com/ID_AA_Carmack/status/2069799283369345247
189•shadowtree•1h ago•72 comments

RubyLLM: A Ruby framework for all major AI providers

https://rubyllm.com/
163•doener•2h ago•21 comments

We’re making Bunny DNS free

https://bunny.net/blog/were-making-bunny-dns-free/
629•dabinat•8h ago•209 comments

CAPTCHAs have failed for 20 years

https://www.browserbase.com/blog/why-captchas-are-getting-harder
22•harsehaj•1h ago•16 comments

Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

https://github.com/nubjs/nub
100•colinmcd•2h ago•23 comments

I taught a bucket to speak Git

https://www.tigrisdata.com/blog/objgit/
20•xena•58m ago•1 comments

PR spam today looks like email spam in the early 2000s

https://www.greptile.com/blog/prs-on-openclaw
28•dakshgupta•2h ago•19 comments

For Most of the World, Open-Source AI Is the Only Way Forward

https://techstrong.ai/articles/for-most-of-the-world-open-source-ai-is-the-only-way-forward/
27•CrankyBear•2h ago•1 comments

Running Windows Games on a Hobby OS with Wine

https://astral-os.org/posts/2026/04/03/wine-on-astral.html
43•avaliosdev•2h ago•11 comments

Krea 2: SOTA open-weights 12B image model

https://www.krea.ai/blog/krea-2-technical-report
162•mattnewton•1d ago•19 comments

Genuinely, my all-time favourite image: Mamenchisaurus hochuanensis

https://svpow.com/2026/06/04/genuinely-my-all-time-favourite-image-mamenchisaurus-hochuanensis/
40•surprisetalk•2d ago•9 comments

A Practical Guide to SSH Tunnels: Local and Remote Port Forwarding

https://labs.iximiuz.com/tutorials/ssh-tunnels
146•signa11•4d ago•30 comments

Boffin claims Microsoft's "quantum leap" is invalid due to "basic Python errors"

https://www.theregister.com/research/2026/06/24/boffin-claims-microsofts-supposed-quantum-leap-do...
59•connorboyle•1h ago•26 comments

Show HN: Monolisa v3 – a typeface for developers and creatives

https://www.monolisa.dev/
81•bebraw•2d ago•18 comments

Haystack: Open-Source AI Framework for Production Ready Agents, RAG

https://haystack.deepset.ai/
58•doener•5h ago•19 comments

Founding a company in Germany: €9600, 152 days and I still can't send an invoice

https://paolino.me/founding-a-company-in-germany/
427•earcar•4h ago•489 comments

Show HN: Pure Effect – Reproduce production bugs on your laptop without a DB

https://pure-effect.org
30•tie-in•2d ago•6 comments

Quebec town recognizes trees as living beings with rights

https://www.cbc.ca/news/canada/montreal/terrasse-vaudreil-quebec-tree-rights-9.7243634
63•speckx•1h ago•51 comments

Edsger Dijkstra's Library (Housed and Archived in Leuven, Belgium)

https://www.dijkstrascry.com/inventory
18•rramadass•1h ago•2 comments

Raspberry Pi Pico W as USB Wi-Fi Adapter

https://gitlab.com/baiyibai/pico-usb-wifi
229•byb•13h ago•108 comments

OpenAI and Broadcom unveil LLM-optimized inference chip

https://openai.com/index/openai-broadcom-jalapeno-inference-chip/
108•meetpateltech•3h ago•36 comments

Statistics that live in your SQL

https://kolistat.com/blog/the-stats-duck-v0-6-0/
110•caerbannogwhite•2d ago•15 comments

Stealing Is a Skill

https://ben-mini.com/2026/stealing-is-a-skill
104•bewal416•3h ago•76 comments

Systems optimization should be part of CI/CD

https://ucbskyadrs.github.io/blog/levi/
16•ttanv•4h ago•2 comments

Ashby (YC W19) Is Hiring EMEA Engineers Who Can Design

https://www.ashbyhq.com/careers?ashby_jid=87b96eef-edc1-4de4-adb6-d460126d02f8&utm_source=hn
1•abhikp•10h ago

François Englert (1932 – 2026)

https://home.cern/francois-englert-1932-2026/
51•toomuchtodo•3d ago•3 comments

Show HN: peerd – AI agent harness that runs entirely in your browser

https://github.com/NotASithLord/peerd
8•NotASithLord•1d ago•2 comments

Too many R packages: CRAN is inundated with submissions

https://rworks.dev/posts/too-many-R-packages/
74•ionychal•6h ago•58 comments

"Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

https://gist.github.com/retroplasma/ec21767d0a8380c7ea9c2fbee1c7d6bf
187•retroplasma•14h ago•78 comments

Minimus container images are now free

https://images.minimus.io/
99•dimastopel•5h ago•59 comments