Bun 1.4 burned 165k dollars of tokens and shipped 1m lines in 11 days by rewriting zig into rust.…
bun 1.4 burned 165k dollars of tokens and shipped 1m lines in 11 days by rewriting zig into rust. nobody on timeline will tell you the real number: that is 16 cents per line of rust. the model did not write the runtime — the model paid for the runtime.
every open source rewrite from here on out has a hidden gpu invoice.
Context
Bun's post of 8 July 2026 gives the Zig codebase as 535,496 lines excluding comments, and search snippets give the token counts as 5.9 billion uncached input tokens, 690 million output tokens and 72 billion cached input token reads. The Pragmatic Engineer, dated 16 July 2026, says the rewrite cost 165,000 dollars at API pricing, took 11 days from planning to the finish, with 6,500 commits and 64 agents, and notes the real cost to Anthropic is lower. Bun 1.4 was released on 20 August 2026.
The 165k is a list-price estimate calculated by a secondary source from Bun's reported token usage, not money actually spent. The 1M lines is not supported: the sources say 535,496 lines of Zig, about 550K ported. Sixteen cents per line is arithmetic on the note's own figures: about 31 cents per line on 535,496 lines, and 16.5 on 1M. Bun 1.4 shipped on 20 August 2026, after the July rewrite. InfoQ, dated 20 September 2026, after the note, says four months of work, and its scope against the 11 days is unresolved. That the model paid for the runtime is the author's opinion.
Related work
- What can we learn from Bun's rapid Rust rewrite with AI (Pragmatic Engineer) ↗Source of the 165,000 dollar figure.
- Bun AI rewrite from Zig to Rust in 4 months (InfoQ, 20 Sep 2026) ↗Dated after the note; scope differs.
Watch next
- Bun's own cost figures, if published.
Sources
- Bun in Rust (Bun blog, 8 Jul 2026)bun.com
- Bun v1.4 (Bun blog)bun.com
- What can we learn from Bun's rapid Rust rewrite with AI (Pragmatic Engineer, 16 Jul 2026)blog.pragmaticengineer.com
Provenance
The note above is reproduced unedited from the original post, first published on Threads on 6 September 2026 at 10:01 IST. Sources are the papers and datasets the note draws on.
View the original post ↗Embed this note
More notes
The air is now being asked to keep its own ledger
the air is now being asked to keep its own ledger: ecmwf’s aifs compo becomes the first ai model to forecast atmospheric composition globally every three hours, cleanair simulates 365 days of pm2.5 over china in ten seconds, and a unified framework maps six pollutants at one kilometer across the whole country. the air now files its own composition report.
read the note →The current is now being asked to draw its own map
the current is now being asked to draw its own map: china’s langya 2.0 predicts six ocean phenomena including internal waves and mesoscale eddies, a deep net called wenhai resolves eddies globally with air sea flux formulas built in, and scripps infers surface currents from the way temperature patterns deform in satellite images. the ocean now files its own circulation report.
read the note →The soil is now being asked to report its own carbon
the soil is now being asked to report its own carbon: a nix color sensor paired with generative data augmentation predicts soil organic carbon without a lab, random forest drives 74 percent of soil health mapping studies, and sentinel 2 tracks five year carbon change across france and italy from 922 samples. the dirt now files its own carbon account.
read the note →