What is the problem this feature would solve?
First of all: congratulations on the Rust rewrite. Truly historic. 1.3.14 was a tearful goodbye and I poured one out for Zig on the night of the merge.
However, this raises a much more serious problem.
For the past four years, the entire JavaScript community has been organized around a single shared activity: demanding that Bun be rewritten in Rust. It was our common language. It was the thing we did. Hacker News threads, Reddit posts, Twitter quote-tweets — all of it scaffolded on the unshakable foundation of "but why isn't it in Rust?"
Now that's gone. Merged. Done. One million lines, shipped over a weekend by Claude. What are we supposed to talk about now? TypeScript decorators? Be serious.
The community is in mourning. We have no purpose. I opened Hacker News this morning and the top comment was agreeing with the article. The vibes are off.
Also, secondary concern: now that we've established that an AI agent can port the entire Bun codebase from Zig to Rust in approximately one (1) Jarred Sumner weekend, the marginal cost of a full-language rewrite has effectively dropped to zero. It would be irresponsible not to make this a runtime flag.
What is the feature you are proposing to solve the problem?
Add a --implementation-language flag (alias: --impl-lang) that triggers an on-the-fly rewrite of the entire Bun codebase into the user's language of choice before executing their script.
bun run index.ts --impl-lang=go
bun install --impl-lang=c++ --edition=23
bunx create-vite --impl-lang=zig # for the nostalgicHow it works
- User invokes
bun runwith--impl-lang=<target>. - Bun spawns a Claude Code subprocess.
- Claude reads the current Rust codebase, the existing
PORTING.md, and writes a newPORTING.mdfor the target language (~300 rules, as is tradition). - Phase A: faithful logic capture, doesn't need to compile.
- Phase B: crate-by-crate (or equivalent) build until 99.8% of the test suite passes on Linux x64 glibc.
- The user's
console.log("hi")is then executed. - Total time: 47 minutes to 3 days, depending on target language and how distracted Claude gets.
Supported targets
rust— current default. No-op. Returns immediately. Prints "based" to stderr.zig— reverses the May 2026 merge. For users experiencing rewrite-grief. Comes with a complimentaryRIIZ.mdrules file.go— adds a GC and three goroutines that do nothing but make the binary feel more "cloud native"c++— Sumner has expressed openness. Template metaprogramming inbun.lockbfinally unlocked.c—bun installnow requires manualfree()after each dependency. Memory leaks are back, baby.ocaml— for the seven people who would actually enjoy thishaskell—bun installbecomes lazy in the literal sense. Packages download only when forced by IO.cobol— enterprise tier. Y2K38-compliant. Ships with a free FORTRAN bindings layer.javascript— Bun rewrites itself in JavaScript, then runs itself inside itself. Recursion depth currently capped at 12 by V8 — sorry, JavaScriptCore — sorry, whatever it's called this week.english— Bun runs entirely through Claude. Every function call isawait claude("please execute my code, politely"). Non-deterministic but very courteous. Coincidentally also the cheapest tier for Anthropic.brainfuck—bun --versiontakes 6 hours. Recommended for CI pipelines you want to fail.
Bonus: --impl-lang=rotate
Picks a different implementation language every Tuesday. Keeps the community discourse fresh. Guarantees at least one viral Hacker News thread per week, sustainably, in perpetuity.
Implementation notes
- The rewrite itself is performed by Claude. Billing goes through the user's Anthropic API key. (Yes, this is the actual business model. Yes, we're being transparent about it. Yes, this is why Anthropic acquired Bun.)
- Each rewrite produces a new
PORTING.mdin~/.bun/rewrites/<timestamp>/, contributing to a growing dataset of cross-language port rules that Claude can learn from. You're welcome. --impl-lang=rustusers get a small badge on their GitHub profile.--impl-lang=zigusers get a different, sadder badge.- The
1.3.14release will be permanently pinned as a memorial. A small candle emoji will appear inbun --versionoutput on its anniversary.
Performance
| Target | Rewrite time | Test pass rate | HN sentiment |
|---|---|---|---|
| rust | 0s (no-op) | 99.8% | 8/10 ("finally") |
| zig | 47min | 99.8% | 10/10 ("based reversal") |
| c++ | 2h | 94% | 5/10 ("but is it modern C++?") |
| go | 30min | 97% | 6/10 ("where's the generics discourse") |
| english | ∞ | non-deterministic | 11/10 ("peak 2026") |
| brainfuck | 3 days | 12% | 10/10 (no one read past the headline) |
Backward compatibility
Fully backward compatible. Default remains rust. Users who want to keep using rust can simply... do nothing. Revolutionary.
Related issues
- Fix ?? operator #1: "Rewrite Bun in Rust" (closed ✅ as
completed, May 2026) - Fix calling #private() functions in classes #2: "Rewrite Bun in Zig" (opened May 15, 2026, currently 2.3k 👍)
- Copy source lines when generating error messages #3: "Rewrite Bun in Rust again, but better this time" (opened May 16, 2026)
- Support import assertions #4: "Why did you rewrite Bun in Rust" (opened May 16, 2026, by the same people who filed Fix ?? operator #1)
This feature closes all of the above with a single flag. Ship it.
What alternatives have you considered?
No response