by smt88 · 2y ago · 0 comments
Rust was literally invented to solve the security and concurrency issues inherent in using C/C++ for a browser engine. You could argue that's the one use-case where it is objectively the best language to use. It's so valuable for that purpose that every large company has rewritten at least some crucial components in Rust.
I also think Rust will be one of the only languages strict enough to enable the use of AI-generated code without compromising security. I certainly don't want AI-generated code for high-security applications, but there's nothing we can do to stop it at this point.
"We are actively evaluating a number of alternatives and will be adding a mature successor language to the project in the near future. This process is already quite far along, and prototypes exist in multiple languages."
I assume it's either Rust or Jakt (the latter a language in development by the Ladybird lead dev), though I suppose Swift might be on the table.
C/C++ is arguably the safer choice in terms of actually completing and maintaining a project of this magnitude.
It very much has.
I do like Rust, but I've only come across a few "higher profile ish" projects. None were really that important or useful that I actually bothered to remember them.
Note that it's likely that some of the biggest applications aren't public and so even if identified you couldn't actually count the lines yourself.
Of course, your mind is biased towards things that have existed for years before Rust gained traction. Those codebases aren't necessarily going to be rewritten overnight (if at all) in Rust. Others have mentioned it, but tech companies are writing foundational software with Rust, check out Cloudflares repository list for example:
https://github.com/orgs/cloudflare/repositories?q=language%3...
Are most browser vulnerabilities not still found in engines like V8? Rust can help with something like last year's buffer overflow in libwebp (although that's overkill when a project like https://github.com/google/wuffs exists), but I'm unclear on how it gets you a better JIT.
Hopefully someone who knows more will explain this better
It's (much) more involved than using C++, but that's a worthwhile tradeoff for something as important as a browser engine.
More info: https://eli.thegreenplace.net/2021/rust-data-structures-with...
good link you shared. i personally always went with option 2 he presents.
You can always go through and systematically remove unnecessary `unsafe` later if needed, but there's no need to do so upfront if that would prevent adoption.
Mozilla doesn't control Rust, and why would it matter? What is your disaster scenario here? What would Mozilla do to sabotage Ladybird?
At this point, Ladybird has no competitors because it is not much more than a hobby project. It isn't usable yet.
>At this point, Ladybird has no competitors because it is not much more than a hobby project. It isn't usable yet.
Whether or not it is usable is a temporary technical issue. It absolutely is a contender for mindshare. Lots of people want a browser that isn't controlled by a nefarious advertising megacorp, and Firefox is about the only game in town. That is hopefully going to change.
Like who?
Anyway, it would be a good thing anyway because "friends of Mozilla" are likely some of the most dedicated FOSS people working in software.
> it is not outside the realm of possibility for Rust to switch to an awful license
It is absolutely outside the realm of possibility. It is as impossible as Python or any other major language doing it. Millions of lines of Rust are in production at for-profit and non-profit orgs, as well as in FOSS projects.
Even if they did it, Rust would be immediately forked and continue as it was before under a different name.
> Whether or not it is usable is a temporary technical issue.
I disagree. It is a long-term technical issue, because every viable browser engine so far has had many millions of person-hours put into it. Ladybird isn't close and likely never will be.