Add `--implementation-language` flag now that RIIR is solved — let users pick the next rewrite

5 min read Original article ↗

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 nostalgic

How it works

  1. User invokes bun run with --impl-lang=<target>.
  2. Bun spawns a Claude Code subprocess.
  3. Claude reads the current Rust codebase, the existing PORTING.md, and writes a new PORTING.md for the target language (~300 rules, as is tradition).
  4. Phase A: faithful logic capture, doesn't need to compile.
  5. Phase B: crate-by-crate (or equivalent) build until 99.8% of the test suite passes on Linux x64 glibc.
  6. The user's console.log("hi") is then executed.
  7. 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 complimentary RIIZ.md rules 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 in bun.lockb finally unlocked.
  • cbun install now requires manual free() after each dependency. Memory leaks are back, baby.
  • ocaml — for the seven people who would actually enjoy this
  • haskellbun install becomes 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 is await claude("please execute my code, politely"). Non-deterministic but very courteous. Coincidentally also the cheapest tier for Anthropic.
  • brainfuckbun --version takes 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.md in ~/.bun/rewrites/<timestamp>/, contributing to a growing dataset of cross-language port rules that Claude can learn from. You're welcome.
  • --impl-lang=rust users get a small badge on their GitHub profile. --impl-lang=zig users get a different, sadder badge.
  • The 1.3.14 release will be permanently pinned as a memorial. A small candle emoji will appear in bun --version output 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

This feature closes all of the above with a single flag. Ship it.

What alternatives have you considered?

No response