85

We’ve been searching for a memory-safe programming language to replace C++ in Ladybird for a while now. We previously explored Swift, but the C++ interop never quite got there, and platform support outside the Apple ecosystem was limited. Rust is a different story. The ecosystem is far more mature for systems programming, and many of our contributors already know the language. Going forward, we are rewriting parts of Ladybird in Rust.

Porting LibJS

I used Claude Code and Codex for the translation. This was human-directed, not autonomous code generation. I decided what to port, in what order, and what the Rust code should look like. It was hundreds of small prompts, steering the agents where things needed to go. After the initial translation, I ran multiple passes of adversarial review, asking different models to analyze the code for mistakes and bad patterns.

you are viewing a single comment's thread
view the rest of the comments
[-] darkkite@lemmy.ml 10 points 1 day ago

The requirement from the start was byte-for-byte identical output from both pipelines. The result was about 25,000 lines of Rust, and the entire port took about two weeks. The same work would have taken me multiple months to do by hand. We’ve verified that every AST produced by the Rust parser is identical to the C++ one, and all bytecode generated by the Rust compiler is identical to the C++ compiler’s output. Zero regressions across the board:

Seems like a non-issue.

[-] GraveyardOrbit@lemmy.zip 4 points 19 hours ago

Sure, it wouldn’t be an issue if you never need to read or modify the code again

[-] darkkite@lemmy.ml 3 points 4 hours ago

Why is that? LLM can generate readable code that can be reviewed prior to merging into the main branch. If you work in small pieces reducing risk.

[-] Jakeroxs@sh.itjust.works 2 points 2 hours ago

There's no arguing with anti-AI people it's pointless

this post was submitted on 23 Feb 2026
85 points (100.0% liked)

Open Source

44826 readers
1394 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 6 years ago
MODERATORS