> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Ladybird Browser Just Ported C++ Code to Rust in 2 Weeks Thanks to AI
- URL: https://itsfoss.com/news/ladybird-web-browser-rustification/
- Published: 2026-02-24T10:28:41.000Z
- Updated: 2026-02-24T10:37:04.000Z
- Description: Turns out AI is pretty handy when you need to port C++ code.
- Author: Sourav Rudra
- Tags: News

We are used to seeing web browsers that are either based on [Chromium](https://www.chromium.org/?ref=itsfoss.com) or [Firefox](https://itsfoss.com/firefox-based-browsers/), and many people are fed up of the [duopoly](https://en.wikipedia.org/wiki/Duopoly?ref=itsfoss.com)\-like situation here. [Ladybird](https://ladybird.org/?ref=itsfoss.com) is a breath of fresh air here, being a truly independent browser with its own engine built from scratch.

While development has been going on in full swing, we are yet to see an official release as of now. The first alpha release for it is set for release sometime in 2026 for Linux and macOS.

Nevertheless, the developers of it have just announced that they are implementing some Rust bits into it.

## What's Happening?

![a screenshot of an early build of ladybird browser running on macos, it shows a fangamer merchandise store listing](https://itsfoss.com/content/images/2026/02/ladybird-early-build.png)

**Placeholder Source:* [**Ladybird*](https://ladybird.org/newsletter/2025-11-30/?ref=itsfoss.com)

For a while now, the Ladybird team has been on the lookout for a memory-safe language to eventually replace [C++](https://isocpp.org/?ref=itsfoss.com). [Swift](https://www.swift.org/?ref=itsfoss.com) was considered at one point, but **poor C++ interoperability and limited platform support** outside Apple's ecosystem ruled it out.

[Rust](https://rust-lang.org/?ref=itsfoss.com) was actually evaluated and rejected back in 2024\. The reasoning was that it didn't play well with C++-style [object-oriented programming](https://en.wikipedia.org/wiki/Object-oriented%5Fprogramming?ref=itsfoss.com), which the web platform relies on heavily. But after another year of searching, the lead developer of Ladybird, [Andreas Kling](https://awesomekling.github.io/about/?ref=itsfoss.com), decided it was time to be pragmatic.

The fact that both Firefox and Chromium have already started bringing Rust into their codebases also helped make the case.

## How's it Done?

Andreas started with [LibJS](https://github.com/LadybirdBrowser/ladybird/tree/master/Libraries/LibJS?ref=itsfoss.com), Ladybird's JavaScript engine, since its core parts are fairly isolated from the rest of the codebase and already have strong test coverage. Rather than writing Rust code from scratch, he used [Claude Code](https://code.claude.com/docs/en/overview?ref=itsfoss.com) and [Codex](https://openai.com/codex/?ref=itsfoss.com) to do the heavy lifting on the translation.

He made it very clear that **human oversight was involved**, with every decision about what to port, in what order, and how the Rust code should be structured coming from him. Post execution, many review passes were performed, pitting different models against each other to catch mistakes.

Two weeks later, the port was done. About 25,000 lines of Rust, something Andreas says would have eaten up several months of manual work. The results held up well too, passing over 52,000 [test262](https://github.com/LadybirdBrowser/libjs-test262?ref=itsfoss.com) tests and around 12,000 Ladybird regression tests with no failures and no performance nerfs on any JavaScript benchmarks.

He also goes on to add that:

> Beyond the test suites, I’ve done extensive testing by browsing the web in a lockstep mode where both the C++ and Rust pipelines run simultaneously, verifying that output is identical for every piece of JavaScript that flows through them.

**Rust is not taking over as the project's main focus though**. C++ is still front and center, and the Rust porting work is more of a slow, long-term effort running alongside it. The two will coexist through defined boundaries. 

Contributors [interested in helping](https://github.com/LadybirdBrowser?ref=itsfoss.com) with the port are also **being asked to coordinate with the core team** first before jumping in.

You can go through the [announcement blog](https://ladybird.org/posts/adopting-rust/?ref=itsfoss.com) to get further information on this.

---

**Suggested Read 📖:** [*Not Every Browser is Built on Chrome*](https://itsfoss.com/firefox-based-browsers/)

[Not Every Browser is Built on Chrome: Explore These Firefox-based OptionsThink all popular browsers out there are Chromium based? Take a look at this Firefox-based options.![](https://itsfoss.com/content/images/icon/android-chrome-512x512-292.png)It's FOSSPulkit Chandak![](https://itsfoss.com/content/images/thumbnail/firefox-based-browsers-2.png)](https://itsfoss.com/firefox-based-browsers/)