Bun creator uses Claude Code to port 750K lines from Zig to Rust in 11 days

Bun creator Jarred Sumner ported roughly 750,000 lines of code from Zig to Rust in eleven days, from first commit to merge. He built a dynamic workflow in Claude Code: a script launches hundreds of subagents, with two reviewers assigned to each file. 99.8% of the existing tests passed, but regressions surfaced after the merge. The speed costs tokens: with several agents running, a Pro or Max quota drains about ten times faster. • The Pro subscription costs $20 a month, and Claude Code has no free tier • Average spend is about $13 per developer per day, or $50–65 with five agents • Workflows require Claude Code version 2.1.154 or higher and a paid plan

AI-processed from Habr AI; edited by Hamidun News
Bun creator uses Claude Code to port 750K lines from Zig to Rust in 11 days
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1The Pro subscription costs $20 a month, and Claude Code has no free tier
Key metric #2Average spend is about $13 per developer per day, or $50–65 with five agents
Key metric #3Workflows require Claude Code version 2.1.154 or higher and a paid plan

Bun creator Jarred Sumner ported the project's codebase from Zig to Rust. He got roughly 750,000 lines of Rust in eleven days, from first commit to merge, and 99.8% of the existing tests passed. The work was done by a Claude Code dynamic workflow: a JavaScript script that Anthropic's agent writes for a specific task and runs in the background, spawning dozens or even hundreds of subagents in a single session. The case is the main argument of a recent overview on Habr, where the author explains to beginners how to work with Claude Code. His caveat: "from prompt to production in two hours" is a real scenario, but only for a small feature or service.

How Bun was rewritten in eleven days

Claude Code is a CLI agent: it runs in the terminal, sees the file system, executes commands, reads the output and corrects its course. Dynamic workflows add scale to this. Each subagent gets its own piece of work, while the script holds the loop, the branching and the intermediate results. With ordinary subagents, everything accumulates in the parent model's context window and can overflow it.

In Bun's case, one workflow worked out the correct Rust lifetime for every struct field in the Zig code. Another wrote .rs files as behaviorally identical ports of the .zig files. Hundreds of agents worked in parallel, with two reviewers per file, and then a fix loop ran the build and tests until everything was clean. By Sumner's estimate, a team of engineers who know the codebase would have needed a year for such a port. He did not expect the approach to work himself, and he tested it on the pre-release Claude Fable 5.

There is a caveat: regressions still appeared after the merge. Sumner is a professional engineer, not a typical vibe coder, so checking the result remains a human's job. Access to these workflows requires Claude Code version 2.1.154 or higher and a paid plan; on Pro, they are enabled by a separate line in /config.

The price of parallelism: limits and subscriptions

Anthropic explicitly warns that dynamic workflows can consume significantly more tokens than a regular session, and advises starting with a limited task. According to independent measurements, with several parallel agents the Pro or Max quota drains about ten times faster. The company puts average daily spend per developer at $13, but with five simultaneous agents it reaches $50–65.

There is no free tier: entry starts with Pro at $20 a month. On all paid plans, Opus 5.5 is the default model, and the plans differ in the number of sessions and in weekly limits. The one-million-token context is available on Max, Team and Enterprise at no extra charge, but it uses up the limit faster. Limits work on a rolling five-hour session window plus a weekly cap, and the pool is shared with chats on claude.ai and in the desktop app.

Fast Mode speeds up generation by up to 2.5 times, but it is not covered by the base subscription limit and is billed from usage credits at API rates. On Opus 5.5 it costs $8 per million input tokens and $40 per million output tokens; on Opus 5 and 4.8 it is $10 and $50. API prices without a subscription: Sonnet 5.5 is $2 and $10, Opus 5.5 is $4 and $20, Fable 5.1 is $10 and $50. Cache reads on Opus 5.5 cost 20 cents per million.

With Cursor, the picture is this: the $30 Premium plan opens up Claude, GPT and Gemini, but third-party models are billed at API prices from a prepaid credit. Opus 5.5 there costs the same $4 and $20 plus the Cursor plan fee. On Max, the cost is fixed until you hit the limit. For anyone who works in Opus every day, a subscription is almost certainly cheaper, while for someone who opens the tool once a week, the API or Cursor is the better deal.

Downsides and risks

In October–November 2026, another wave of account bans hit, mostly affecting users from unsupported countries. The quota drains faster on the same workflow. Possible causes include changes in the Opus 5.5 tokenizer, background tasks, and MCP servers that load tool descriptions into the context. In addition, Claude has started refusing to help with analysis of third-party software, and two lines were added to the Opus 5.5 system prompt forbidding the recreation of other people's games.

There are engineering risks too. In May 2026, Anthropic closed two vulnerabilities in the Claude Code network sandbox: they allowed traffic to be redirected and, combined with prompt injection, environment variables and other sensitive data to be extracted. In June, a similar hole was found in the WebFetch component: malicious content in files or repositories could make the agent send data outside. The patches shipped quickly, but before giving an agent access to confidential repositories, it is worth checking the environment and keeping the version up to date.

Story

Key Questions Answered

How Bun was rewritten in eleven days?

Claude Code is a CLI agent: it runs in the terminal, sees the file system, executes commands, reads the output and corrects its course. Dynamic workflows add scale to this. Each subagent gets its own piece of work, while the script holds the loop, the branching and the intermediate results. With ordinary subagents, everything accumulates in the parent model's context window and can overflow it. In Bun's case, one workflow worked out the correct Rust lifetime for every struct field in the Zig code. Another wrote .rs files as behaviorally identical ports of the .zig files. Hu

What are the key details on The price of parallelism: limits and subscriptions?

Anthropic explicitly warns that dynamic workflows can consume significantly more tokens than a regular session, and advises starting with a limited task. According to independent measurements, with several parallel agents the Pro or Max quota drains about ten times faster. The company puts average daily spend per developer at $13, but with five simultaneous agents it reaches $50–65. There is no free tier: entry starts with Pro at $20 a month. On all paid plans, Opus 5.5 is the default model, and the plans differ in the number of sessions and in weekly limits. The one-millio

What are the key details on Downsides and risks?

In October–November 2026, another wave of account bans hit, mostly affecting users from unsupported countries. The quota drains faster on the same workflow. Possible causes include changes in the Opus 5.5 tokenizer, background tasks, and MCP servers that load tool descriptions into the context. In addition, Claude has started refusing to help with analysis of third-party software, and two lines were added to the Opus 5.5 system prompt forbidding the recreation of other people's games. There are engineering risks too. In May 2026, Anthropic closed two vulnerabilities in the

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…