5 ms·
I hope someday maybe we have a browser completely written in Rust. What's the point of using Rust in a C++ code base if C++ is the 800lb gorilla as the article
by onebot 6y ago
I hope someday maybe we have a browser completely written in Rust.
What's the point of using Rust in a C++ code base if C++ is the 800lb gorilla as the article implies. If C++ is so important, then just stick to that?!
- bsder 6y ago> If C++ is so important, then just stick to that?! A journey of a thousand miles begins with a single step ... Legacy is a thing. Replacing it piecemeal is the only way to get it replaced. In addition, you can prioritize pieces. If a particular piece is very likely to be a security problem or has lots of bugs, you can rewrite just that piece into Rust.
- SquareWheel 6y agoSome areas of code are more sensitive than others. Eliminating bugs in areas dealing with encryption, sandboxing, etc may be very beneficial.
- erik_seaberg 6y agoThe strangler pattern (gradually replacing C++ with Rust) is pretty much the only alternative to a https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ https://www.joelonsoftware.com/2000/04/06/things-you-should-... complete rewrite.
- est31 6y agoYou have to start somewhere. Every C++ component that's replaced by a safe Rust component is a reduction in attack surface.
- Skunkleton 6y agoMost of the fun stuff your computer is doing right now is the direct result of C and C++ code (browser, kernel, web server, games, etc.). Replacing all that code in one go isn't going to happen. Still, Rust solves some real problems with C++, so we shouldn't ignore it. If we can't replace the world all at once, why not do it piecemeal while targeting the highest value components?
- emptyparadise 6y agoIf only a certain foundation's corporate half didn't fire its Rust browser developers.
- fgdfgddfg 6y agoThat was the goal with Servo, but Mozilla axed them https://twitter.com/directhex/status/1293352458308198401 https://twitter.com/directhex/status/1293352458308198401
- M2Ys4U 6y agoServo was always a research project around writing a rendering engine and not an attempt to create a whole new browser product.
- mitchtbaum 6y agoWebrender would work better as the complete OS interface than as an engine for one browser/app.