{"id":588966,"date":"2026-05-17T12:37:29","date_gmt":"2026-05-17T12:37:29","guid":{"rendered":"https:\/\/www.newsbeep.com\/uk\/588966\/"},"modified":"2026-05-17T12:37:29","modified_gmt":"2026-05-17T12:37:29","slug":"anthropics-bun-rust-rewrite-merged-at-speed-of-ai","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/uk\/588966\/","title":{"rendered":"Anthropic\u2019s Bun Rust rewrite merged at speed of AI"},"content":{"rendered":"<p class=\"kicker \" style=\"\">DevOps<\/p>\n<p class=\"subtitle \" style=\"\">Version 1.3.14 of JavaScript toolkit released as last Zig version; a million lines of Rust code merged in gargantuan commit<\/p>\n<p>A pull request with a Rust version of Anthropic\u2019s Bun, a<br \/>\nJavaScript toolkit and runtime originally written in Zig, has been merged to<br \/>\nthe main Bun repository. This comes just days after its author, Jared Sumner, said<br \/>\n&#8220;there&#8217;s a very high chance all this code gets thrown out.&#8221;<\/p>\n<p>Sumner posted on X (formerly Twitter) five days ago that &#8220;99.8 percent of bun&#8217;s pre-existing test suite passes on Linux x64f<br \/>\nglibc in the rust rewrite,&#8221; a clue that what was initially described as an<br \/>\nexperiment was likely to make it to production. Three days later, the Bun team<br \/>\nreleased version 1.3.14, with Sumner stating that if the Rust rewrite was<br \/>\nmerged, &#8220;this would be the last version in Zig.&#8221;<\/p>\n<p>                <img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/uk\/wp-content\/uploads\/2026\/05\/1630805.webp\" width=\"480\" height=\"274\" alt=\"\" loading=\"lazy\" style=\"\"\/><\/p>\n<p>\n            Creator Jarred Sumner presented Bun in a launch video<\/p>\n<p>Today that merge took place,<br \/>\nadding more than one million lines of code. Sumner said it passes Bun&#8217;s test<br \/>\nsuite on all platforms, fixes some memory leaks, and shrinks the binary size by<br \/>\nbetween 3 and 8 MB.\u00a0<\/p>\n<p>&#8220;Most importantly, we now have compiler-assisted tools<br \/>\nfor catching and preventing memory bugs, which have cost the team an enormous<br \/>\namount of development and debugging time over the years,&#8221; he said in a<br \/>\ncomment. Performance is either neutral or faster, he said, though the codebase<br \/>\nis &#8220;the same architecture, the same data structures.&#8221; No async Rust<br \/>\nis used.<\/p>\n<p>Bun users have hit memory leak issues when deploying it as a<br \/>\nproduction runtime. According to Sumner,<br \/>\n&#8220;Rust won\u2019t catch all of these &#8211; leaks from holding references too long<br \/>\nand anything that re-enters across the JS boundary are still on us. But a large<br \/>\npercentage of that list is use-after-free, double-free, and forgot-to-free-on-error-path,<br \/>\nand those become compile errors or automatic cleanup.&#8221;<\/p>\n<p>                <img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/uk\/wp-content\/uploads\/2026\/05\/5240406.webp\" width=\"480\" height=\"274\" alt=\"AI Slop? A pull request removing Zig source files from Bun was automatically flagged.\" loading=\"lazy\" style=\"\"\/><\/p>\n<p>\n            AI Slop? A pull request removing Zig source files from Bun was automatically flagged.<\/p>\n<p>A second pull request, removing upwards of 600,000 lines of Zig code,<br \/>\nwas automatically flagged by GitHub as &#8220;AI slop&#8221; and closed, but will<br \/>\npresumably reappear in some form.<\/p>\n<p>The size of these commits makes them near-impossible for<br \/>\nhumans to review. &#8220;What a nice reviewable little commit. I&#8217;m sure it will<br \/>\nnot contain any bugs,&#8221; <a href=\"https:\/\/github.com\/oven-sh\/bun\/commit\/23427dbc12fdcff30c23a96a3d6a66d62fdc091d#commitcomment-185276243\" aria-label=\"Comment on GitHub merge\" target=\"_blank\" rel=\"nofollow noopener\">said<\/a>\u00a0one comment on the Rust merge.<\/p>\n<p>Although the idea of the Rust port has been well received, the<br \/>\nspeed of the transition has taken the community by surprise. In normal circumstances,<br \/>\nporting a major project so quickly would be risky, but this has been accomplished<br \/>\nusing AI tools. According to Sumner, it is &#8220;essentially the same codebase<br \/>\nported to Rust.&#8221;<\/p>\n<p>                <img decoding=\"async\" src=\"https:\/\/www.newsbeep.com\/uk\/wp-content\/uploads\/2026\/05\/5240449.webp\" width=\"480\" height=\"274\" alt=\"\" loading=\"lazy\" style=\"\"\/><\/p>\n<p>\n            Bun creator Jarred Sumner said that AI writes all the code<\/p>\n<p>Asked whether the Rust version would be maintained mainly by<br \/>\nAnthropic\u2019s Claude Code, Sumner <a href=\"https:\/\/x.com\/jarredsumner\/status\/2054525268296118363\" aria-label=\"Bun team not writing code\" target=\"_blank\" rel=\"nofollow\">said<\/a>\u00a0&#8220;this is already the status<br \/>\nquo; we haven\u2019t been typing code ourselves for many months now. Even<br \/>\npre-acquisition [by Anthropic] this was pretty much accurate.&#8221;<\/p>\n<p>Sumner was formerly a strong Zig advocate, but Zig\u2019s no-AI<br \/>\npolicy is at odds with the Bun team\u2019s way of working, and recent versions of<br \/>\nBun use a Zig fork with contributions that cannot be merged upstream, and which<br \/>\nZig\u2019s maintainers said would not be welcome\u00a0regardless of the AI aspect.<\/p>\n<p>Version 1.3.14, the last one still to use Zig, adds a<br \/>\nbuilt-in image processing API for decoding, transforming and encoding images.<br \/>\nIt is designed as a drop-in replacement for the Sharp\u00a0image processing library for Node.js. The new release also adds experimental<br \/>\nsupport for the HTTP\/3 (QUIC) protocol in Bun\u2019s integrated server. The full<br \/>\nrelease notes\u00a0describe these and other new<br \/>\nfeatures.<\/p>\n<p>Is it possible to move this fast and not break things? Bun&#8217;s<br \/>\nmigration from Zig to Rust will be watched with interest by AI advocates and<br \/>\nsceptics alike. \u00ae<\/p>\n","protected":false},"excerpt":{"rendered":"DevOps Version 1.3.14 of JavaScript toolkit released as last Zig version; a million lines of Rust code merged&hellip;\n","protected":false},"author":2,"featured_media":588967,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[554,733,4308,86,56,54,55],"class_list":["post-588966","post","type-post","status-publish","format-standard","has-post-thumbnail","category-artificial-intelligence","tag-ai","tag-artificial-intelligence","tag-artificialintelligence","tag-technology","tag-uk","tag-united-kingdom","tag-unitedkingdom"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts\/588966","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/comments?post=588966"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/posts\/588966\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/media\/588967"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/media?parent=588966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/categories?post=588966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/uk\/wp-json\/wp\/v2\/tags?post=588966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}