The things people criticize are so fucking brainless these days. AI this, slop that.
Not a single one of you made fun of "let's rewrite it in Rust." You can't even elevate to the level of mildly funny parroting.
This is a most excellent place for technology news and articles.
The things people criticize are so fucking brainless these days. AI this, slop that.
Not a single one of you made fun of "let's rewrite it in Rust." You can't even elevate to the level of mildly funny parroting.
“Let’s stop halfway through our multi-year project to rewrite it in another language” is peak nerd shiny distraction. I say this as one who resists the urge every day. Way to delay your project by several more years, clown.
All things considered the way they're approaching the migration is fine enough - they're only moving specific portions at a time, they're not stopping C++ development, and they're making sure it doesn't introduce regressions. Adopting a memory-safe language for something like a browser makes sense because it completely eliminates that class of vulnerabilities.
The problem is the way they're approaching the code itself. From their wording, it sounds like they're relying on AI heavily for both writing and reviewing the code. Rust has a steeper learning curve than most languages and is very different from C++. They even mention in the blog that their current Rust code looks like C++ code ported over. If they don't take the time to actually learn Rust before adopting it, it'll just lead to security logic issues that their AI couldn't catch because C++ and Rust don't always behave the same way. And that's completely ignoring all of the other ethical/technical issues with AI
Be that as it may, the time to choose Rust was at the beginning. It existed then, but they made their technology choice. Continuing to develop in C++ while doing the migration just means more throwaway code and duplicated effort. This decision is truly the worst of both worlds.
I've suddenly lost all interest in this browser's development. From what I've heard, LLMs are pretty bad at generating Rust code for some reason. If they used LLM to bulk convert C++ code to Rust, the quality of the code is questionable at best.
Surely you read the article?
"The requirement from the start was byte-for-byte identical output from both pipelines. "
The bytecode from C++ is identical to the Rust output.
~~I don't think it's possible to write rust code that compiles to the exact same binary as c++. compilers make different optimizations, and make overall a different structure, especially across languages.~~
~~I think they meant the rust library produces the same output from the same input as the c++ library.~~
if llms indeed generate worse rust code than for other languages, that's not that big of a problem because the compiler will catch a lot of mistakes. if it compiles, it will run, and no memory safety bugs unless unsafe is also used. the llm could pick the wrong functions for some uses, but that should be caught relatively easily with testing, which can be automated partly
edit: I was wrong, they indeed say that. this is weird.
The worst part is they are doing themselves a disservice by not rewriting it by hand - have they really learnt enough Rust to know how to effectively rewrite the other parts of the engine as they say? Doubtful - they'll probably just do everything through AI stuff going forward.
Gross
common ladybird l