Y
HN HRCB new | past | comments | ask | show | by right | domains | dashboard | about hrcb
+0.22 Ladybird adopts Rust, with help from AI (ladybird.org)
1250 points by adius 1 days ago | 691 comments on HN | Mild positive Editorial · vv3.4 · 2026-02-24
Article Heatmap
Preamble: +0.10 — Preamble P Article 1: ND — Freedom, Equality, Brotherhood Article 1: No Data — Freedom, Equality, Brotherhood 1 Article 2: ND — Non-Discrimination Article 2: No Data — Non-Discrimination 2 Article 3: ND — Life, Liberty, Security Article 3: No Data — Life, Liberty, Security 3 Article 4: ND — No Slavery Article 4: No Data — No Slavery 4 Article 5: ND — No Torture Article 5: No Data — No Torture 5 Article 6: ND — Legal Personhood Article 6: No Data — Legal Personhood 6 Article 7: ND — Equality Before Law Article 7: No Data — Equality Before Law 7 Article 8: ND — Right to Remedy Article 8: No Data — Right to Remedy 8 Article 9: ND — No Arbitrary Detention Article 9: No Data — No Arbitrary Detention 9 Article 10: ND — Fair Hearing Article 10: No Data — Fair Hearing 10 Article 11: ND — Presumption of Innocence Article 11: No Data — Presumption of Innocence 11 Article 12: ND — Privacy Article 12: No Data — Privacy 12 Article 13: ND — Freedom of Movement Article 13: No Data — Freedom of Movement 13 Article 14: ND — Asylum Article 14: No Data — Asylum 14 Article 15: ND — Nationality Article 15: No Data — Nationality 15 Article 16: ND — Marriage & Family Article 16: No Data — Marriage & Family 16 Article 17: ND — Property Article 17: No Data — Property 17 Article 18: ND — Freedom of Thought Article 18: No Data — Freedom of Thought 18 Article 19: +0.39 — Freedom of Expression 19 Article 20: +0.20 — Assembly & Association 20 Article 21: +0.13 — Political Participation 21 Article 22: ND — Social Security Article 22: No Data — Social Security 22 Article 23: ND — Work & Equal Pay Article 23: No Data — Work & Equal Pay 23 Article 24: ND — Rest & Leisure Article 24: No Data — Rest & Leisure 24 Article 25: ND — Standard of Living Article 25: No Data — Standard of Living 25 Article 26: +0.26 — Education 26 Article 27: +0.35 — Cultural Participation 27 Article 28: +0.13 — Social & International Order 28 Article 29: +0.10 — Duties to Community 29 Article 30: ND — No Destruction of Rights Article 30: No Data — No Destruction of Rights 30
Negative Neutral Positive No Data
Aggregates
Weighted Mean +0.22 Unweighted Mean +0.21
Max +0.39 Article 19 Min +0.10 Preamble
Signal 8 No Data 23
Confidence 12% Volatility 0.11 (Low)
Negative 0 Channels E: 0.6 S: 0.4
SETL +0.05 Editorial-dominant
Evidence: High: 0 Medium: 5 Low: 3 No Data: 23
Theme Radar
Foundation Security Legal Privacy & Movement Personal Expression Economic & Social Cultural Order & Duties Foundation: 0.10 (1 articles) Security: 0.00 (0 articles) Legal: 0.00 (0 articles) Privacy & Movement: 0.00 (0 articles) Personal: 0.00 (0 articles) Expression: 0.24 (3 articles) Economic & Social: 0.00 (0 articles) Cultural: 0.30 (2 articles) Order & Duties: 0.12 (2 articles)
Domain Context Profile
Element Modifier Affects Note
Privacy
No privacy policy or data collection signals observed on-domain.
Terms of Service
No terms of service visible on this article page.
Accessibility +0.08
Article 26
Navigation markup includes aria-expanded and semantic structure, indicating accessibility consideration in site design.
Mission +0.05
Article 19 Article 27
Open-source browser project (implicit from context) suggests transparency and collaborative values aligned with knowledge sharing.
Editorial Code
No explicit editorial code of conduct observed.
Ownership
Author identified (Andreas Kling, Founder & President); organizational structure not fully detailed on-domain.
Access Model +0.12
Article 19 Article 27
Technical blog posts are openly accessible; no paywall or access restrictions observed.
Ad/Tracking
No advertising or tracking pixels visible in provided content.
HN Discussion 20 top-level comments
viktorcode 2026-02-23 11:47 UTC link
> We previously explored Swift, but the C++ interop never quite got there

But Rust doesn't have C++ interop at all?

mosura 2026-02-23 11:48 UTC link
Interestingly editorialized title omits “with help from AI”.
qudat 2026-02-23 11:50 UTC link
> We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in time.

Correct me if I’m wrong since I don’t know these two languages, but like some other languages, doing things the idiomatic way could be dramatically different. Is “cleanup” doing a lot of heavy lifting here? Could that also mean another complete rewrite from scratch?

A startup switching languages after years of development is usually a big red flag. “We are rewriting it in X” posts always preceded “We are shutting down”. I wish them luck though!

skerit 2026-02-23 11:56 UTC link
> 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. > 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

This is the way. Coding assistants are also really great at porting from one language to the other, especially if you have existing tests.

ramon156 2026-02-23 12:19 UTC link
I'm a long-time Rust fan and have no idea how to respond. I think I need a lot more info about this migration, especially since Ladybird devs have been very vocal about being "anti-rust" (I guess more anti-hype, where Rust was the hype).

I don't know if it's a good fit. Not because they're writing a browser engine in Rust (good), but because Ladybird praises CPP/Swift currently and have no idea what the contributor's stance is.

At least contributing will be a lot nicer from my end, because my PR's to Ladybird have been bad due to having no CPP experience. I had no idea what I was doing.

djoldman 2026-02-23 12:32 UTC link
A lot of the previous calculus around refactoring and "rewrite the whole thing in a new language" is out the window now that AI is ubiquitous. Especially in situations where there is an extensive test suite.

Testing has become 10x as important as ever.

pjmlp 2026-02-23 12:33 UTC link
All the best to them, however this feels like yah shaving instead of focusing into delivering a browser than can become an alternative to Safari/Chrome duopoly.
easton 2026-02-23 12:48 UTC link
I know he doesn't make live coding videos anymore, but it'd be cool if Andreas showed off how this worked a little more. I'm curious how much he had to fix by hand (vs reprompting or spinning a different model or whatever).
account42 2026-02-23 12:51 UTC link
> We previously explored Swift, but the C++ interop never quite got there, and platform support outside the Apple ecosystem was limited.

Why was there ever any expectation for Swift having good platform support outside Apple? This should have been (and was to me) already obvious when they originally announced moving to Swift.

nicoburns 2026-02-23 12:59 UTC link
Very happy to see this. Ladybird's engineering generally seems excellent, but the decision to use Swift always seemed pretty "out there". Rust makes a whole lot more sense.
thiht 2026-02-23 13:10 UTC link
Cool, that seems like a rational choice. I hope this will help Ladybird and Servo benefit from each other in the long run, and will make both of them more likely to succeed
vipulbhj 2026-02-23 13:18 UTC link
Someone should try this with the “Ralph Wiggum loop” approach. I suspect it would fail spectacularly, but it would be fascinating to watch.

Personally, I can’t get meaningful results unless I use the tool in a true pair-programming mode—watching it reason, plan, and execute step by step. The ability to clearly articulate exactly what you want, and how you want it done, is becoming a rare skill.

Fervicus 2026-02-23 13:19 UTC link
> We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in time.

I wonder what kind of tech debt this brings and if the trade off will be worth whatever problems they were having with C++.

ZoomZoomZoom 2026-02-23 14:10 UTC link
Looks like Andreas is a mighty fine engineer, but he's even better entrepreneur. Doesn't matter if intentional or not, but he managed to create and lead a rather visible passion project, attract many contributors and use that project's momentum to detach Ladybird into a separate endeavor with much more concrete financial prospects.

The Jakt -> Swift -> Rust pivots look like the same thing on a different level. The initial change to Swift was surely motivated by potential industry support gain (i believe it was a dubious choice from purely engineering standpoint).

It's awe-inspiring to see how a person can carve a job for himself, leverage hobbyists'/hackers' interest and contributions, attract industry attention and sponsors all while doing the thing he likes (assuming, browsers are his thing) in a controlling position.

Can't fully rationalize the feeling, but all of this makes me slightly wary. Doesn't make it less cool to observe from a side, though.

kneel25 2026-02-23 14:34 UTC link
> After the initial translation, I ran multiple passes of adversarial review, asking different models to analyze the code for mistakes and bad patterns.

I feel like you just know it’s doomed. What this is saying is “I didn’t want to and cannot review the code it generated” asking models to find mistakes never works for me. It’ll find obvious patterns, a tendency towards security mistakes, but not deep logical errors.

alabhyajindal 2026-02-23 15:15 UTC link
> This is not becoming the main focus of the project. We will continue developing the engine in C++, and porting subsystems to Rust will be a sidetrack that runs for a long time.

I don't like this bit. Wouldn't it be better to decide on a memory-safe language, and then commit to it by writing all new code in Rust, or whatever. This looks like doing double the work.

alabhyajindal 2026-02-23 15:38 UTC link
From their post on Twitter in 2024 when they adopted Swift, with a comment on Rust.

My general thoughts on Rust:

- Excellent for short-lived programs that transform input A to output B

- Clunky for long-lived programs that maintain large complex object graphs

- Really impressive ecosystem

- Toxic community

https://xcancel.com/awesomekling/status/1822241531501162806

jp1016 2026-02-23 15:57 UTC link
The byte-for-byte identical output requirement is the smartest part of this whole thing. You basically get to run the old and new pipelines side by side and diff them, which means any bug in the translation is immediately caught. Way too many rewrites fail because people try to "improve" things during the port and end up chasing phantom bugs that might be in the old code, the new code, or just behavioral differences.

Also worth noting that "translated from C++" Rust is totally fine as a starting point. You can incrementally make it more idiomatic later once the C++ side is retired. The Rust compiler will still catch whole classes of memory bugs even if the code reads a bit weird. That's the whole point.

AlexCoventry 2026-02-24 06:39 UTC link
> If you look at the code, you’ll notice it has a strong “translated from C++” vibe. That’s because it is translated from C++. The top priority for this first pass is compatibility with our C++ pipeline. The Rust code intentionally mimics things like the C++ register allocation patterns so that the two compilers produce identical bytecode. Correctness is a close second. We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline.

Does this still get you most of the memory-safety benefits of using Rust vs C++?

andsoitis 2026-02-24 13:22 UTC link
> We will continue developing the engine in C++, and porting subsystems to Rust will be a sidetrack that runs for a long time.

So, even though they want the code base to be in Rust, they will continue writing new code in C++ and then translating it to Rust later to remove the C++ they just added.

There must be a really good reason for this, such as Rust doesn’t interop well with C++, otherwise this seems like a poor decision.

Score Breakdown
+0.10
Preamble Preamble
Medium F: Recognition of collaborative effort and inclusive values (contributors, ecosystem, deliberate coordination)
Editorial
+0.05
Structural
ND
SETL
ND
Combined
ND
Context Modifier
ND

Text frames the work as collective and thoughtful decision-making. Implicit commitment to orderly collaboration and shared goals aligns mildly with dignity and cooperation themes in Preamble.

ND
Article 1 Freedom, Equality, Brotherhood

No observable signal regarding equality, dignity, or reason and conscience.

ND
Article 2 Non-Discrimination

No observable signal regarding discrimination or distinction.

ND
Article 3 Life, Liberty, Security

No observable signal regarding right to life, liberty, or security of person.

ND
Article 4 No Slavery

No observable signal regarding slavery or servitude.

ND
Article 5 No Torture

No observable signal regarding torture or cruel treatment.

ND
Article 6 Legal Personhood

No observable signal regarding right to recognition as person before law.

ND
Article 7 Equality Before Law

No observable signal regarding equal protection and freedom from discrimination.

ND
Article 8 Right to Remedy

No observable signal regarding remedy for violation of rights.

ND
Article 9 No Arbitrary Detention

No observable signal regarding arrest or detention.

ND
Article 10 Fair Hearing

No observable signal regarding fair and public hearing.

ND
Article 11 Presumption of Innocence

No observable signal regarding criminal presumption of innocence or retroactive law.

ND
Article 12 Privacy

No observable signal regarding privacy, family, or correspondence.

ND
Article 13 Freedom of Movement

No observable signal regarding freedom of movement.

ND
Article 14 Asylum

No observable signal regarding asylum or refuge.

ND
Article 15 Nationality

No observable signal regarding nationality.

ND
Article 16 Marriage & Family

No observable signal regarding marriage and family.

ND
Article 17 Property

No observable signal regarding property rights.

ND
Article 18 Freedom of Thought

No observable signal regarding freedom of thought and conscience.

+0.39
Article 19 Freedom of Expression
Medium A: Open publication of technical decision-making rationale P: Publicly accessible blog post with transparent reasoning F: Framing of decision as one that 'will be controversial' invites public discourse
Editorial
+0.25
Structural
+0.30
SETL
-0.12
Combined
ND
Context Modifier
ND

Content demonstrates freedom of expression through transparent publication of technical decisions. Author explicitly invites disagreement ('I know this will be controversial'). Post is freely accessible, supporting information exchange and opinion formation.

+0.20
Article 20 Assembly & Association
Medium A: Invitation to peaceful contribution and coordination F: Emphasis on collaborative, non-autonomous decision-making
Editorial
+0.15
Structural
ND
SETL
ND
Combined
ND
Context Modifier
ND

Text explicitly requests coordination and collaboration ('Please coordinate with us before starting any porting work'). Governance structure emphasizes deliberate, managed process rather than unilateral action. Modest signal of structured collective participation.

+0.13
Article 21 Political Participation
Low P: Core team management of porting effort F: Deliberate governance of contribution process
Editorial
+0.10
Structural
+0.05
SETL
+0.07
Combined
ND
Context Modifier
ND

Structure indicates managed participation in project decisions by core team; broader public voice in governance not explicitly addressed. Mildly positive signal regarding order and process, but limited evidence of democratic participation or universal voice.

ND
Article 22 Social Security

No observable signal regarding social security or welfare rights.

ND
Article 23 Work & Equal Pay

No observable signal regarding work, employment, or just conditions of work.

ND
Article 24 Rest & Leisure

No observable signal regarding rest and leisure.

ND
Article 25 Standard of Living

No observable signal regarding standard of living or health.

+0.26
Article 26 Education
Medium P: Open-source project structure (implicit) enabling access to technical education and knowledge A: Transparent documentation of technical process and reasoning F: Detailed explanation of methodology aids understanding and learning
Editorial
+0.20
Structural
+0.15
SETL
+0.10
Combined
ND
Context Modifier
ND

Post serves educational function by documenting technical decision-making, methodologies, and results in accessible language. Freely available blog post supports right to education and technical literacy. Open-source context (inferred from domain) further supports this. Modest positive signal.

+0.35
Article 27 Cultural Participation
Medium A: Protection and development of scientific and technical achievement (adopting memory-safe language) P: Open-source contribution model enabling participation in cultural and technical life F: Detailed explanation of technical work invites participation in shared knowledge
Editorial
+0.25
Structural
+0.20
SETL
+0.11
Combined
ND
Context Modifier
ND

Content documents technical achievement (Rust porting) and participates in shared scientific and technical development. Open publication supports participation in cultural life of scientific community. Coordination language supports collaborative benefit-sharing.

+0.13
Article 28 Social & International Order
Low P: Structured governance and coordination process
Editorial
+0.10
Structural
+0.05
SETL
+0.07
Combined
ND
Context Modifier
ND

Text references 'social order' implicitly through emphasis on deliberate management and coordination. Limited direct evidence regarding right to social order for individual development.

+0.10
Article 29 Duties to Community
Low F: Recognition of duties to community through coordination requirements
Editorial
+0.05
Structural
ND
SETL
ND
Combined
ND
Context Modifier
ND

Modest signal through emphasis on responsible collaboration and coordination with community. Text requests contributors respect project governance, implying duties to collective.

ND
Article 30 No Destruction of Rights

No observable signal regarding prohibition of rights destruction or limitation beyond legal necessity.

About HRCB | By Right | HN Guidelines | HN FAQ | Source | UDHR
build fc56cf0+0q5s · 2026-02-25 01:32 UTC