4 ms·
It would cost much more to rewrite in Rust. Again thats why im saying that if the project would start now in 2020, all of those would be pretty good points. Ri
by oscargrouch 6y ago
It would cost much more to rewrite in Rust.
Again thats why im saying that if the project would start now in 2020, all of those would be pretty good points. Right now is too late for that.
As another example, you can get just the V8 VM for instance. For start, with the ammount of solid code out there it would be nuts to talk over a rewrite..
Now imagine if we add to that, that the knowledge on JIT compilers is so difficult to grasp, that you would also need to have those same great engineers in the new language/platform you are planning the rewrite.
Giving the age of Rust, and giving you already have a bad time of finding those in the much older C++, imagine the time it takes to have the same quality people in Rust.
I know a lot of people are bully about Rust, but in reality things are not that simple.
(On the bright side, is not that hard to taught a C++ engineer to code in Rust)
- roca 6y agoIf you care about security, it is much easier to write non-exploitable code in Rust than in C++, and you can hire accordingly. Actually, the people who are really experienced at writing secure code in C++ understand that they can't do it reliably, and an increasing number of them (like me) would much rather write Rust code instead for that reason. So for secure code the hiring advantage is tilting away from C++ towards Rust.
- rvz 6y agoYet once the Chromium team goes down that Rust to C++ FFI route, they will encounter the same old bugs outlined in this paper. [0] They might as well fork Servo and create their own engine from that, but even that is still a prototype worked on for years with zero C++ at least. It's too early to see how the Chromium team will begin to work on this given it's only a plan, but maybe the unsafety and security issues are enough motivation to actually use Rust to C++ interop or a rewrite. But once again, this has been tried by some other projects and by just looking at the effort of a rewrite, they later concluded that it is not worth it. [1] [2] Even better, just improve Servo instead. But I guess they would rather create their own fork, just like they did with WebKit. [0] https://arxiv.org/pdf/2003.03296.pdf https://arxiv.org/pdf/2003.03296.pdf [1] https://blogs.dust3d.org/2019/03/13/why-i-rewrote-the-mesh-generator-of-dust3d-from-rust-to-cplusplus/ https://blogs.dust3d.org/2019/03/13/why-i-rewrote-the-mesh-g... [2] http://way-cooler.org/blog/2019/04/29/rewriting-way-cooler-in-c.html http://way-cooler.org/blog/2019/04/29/rewriting-way-cooler-i...
- roca 6y agoNone of this logic follows. Paper [0] categorizes bugs in unsafe Rust code. "There will be some bugs in FFI code" does not imply "no benefit to using Rust if there is C++ FFI". Many projects, including Firefox, have found Rust is really helpful even if you have C++ FFI.