

- cross-posted to:
- opensource@programming.dev




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.
I am completely disappointed in Ladybird, even though I had some hope for the project until now. I guess all that’s left to do is wait for Servo.
Given that Servo was already written in rust (and not just some of it), it does feel a bit like wasted effort.
(Plus, it was started by Mozilla, so theres the irony factor)
We need competition in the browser market, ANY competition!
* ladybird appears *
Well… that was on me, I set the bar too low
I mean when they adopted MS GitHub & Discord as their only modes of community & contribution, you can know any “open source” project is built on sand
Your final hope at this point is announcing you will not use LLM to write any part of your program, including tests. Adopting a language which your developers are less familiar is bad enough, and you’re writing it with LLM? I’d rather you stick with C++.
It uses AI? Right, then I’m boycotting it ad infinitum.
Actually not a terrible way to use AI. Hopefully the port goes well
I came to say this sounds like a good example of how to use ai. Its going to be used but the big problem is folks who will take the output and say good enough.
Yeah, using AI to help you rewrite code (which is tedious) in a scenario where there are clear test cases (it either works or it doesn’t) is basically the ideal usecase.
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.
Removed by mod
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.
We previously explored Swift, but the C++ interop never quite got there, and platform support outside the Apple ecosystem was limited
It’s as if everybody told you this the second you announced your move to Swift but aight.
deleted by creator