News for hackers. Stuff that matters.
Re:Rust and C++ Interoperability in Chrome by onebot on Wednesday August 19, 2020 @04:45PM (#24216184)
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?!

Re:Rust and C++ Interoperability in Chrome by erik_seaberg on Wednesday August 19, 2020 @05:59PM (#24217212)
The 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-... complete rewrite.
Re:Rust and C++ Interoperability in Chrome by SquareWheel on Wednesday August 19, 2020 @05:44PM (#24217019)
Some areas of code are more sensitive than others. Eliminating bugs in areas dealing with encryption, sandboxing, etc may be very beneficial.
Re:Rust and C++ Interoperability in Chrome by Skunkleton on Wednesday August 19, 2020 @08:27PM (#24218525)
Most 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?
Re:Rust and C++ Interoperability in Chrome by est31 on Wednesday August 19, 2020 @06:21PM (#24217464)
You have to start somewhere. Every C++ component that's replaced by a safe Rust component is a reduction in attack surface.
Re:Rust and C++ Interoperability in Chrome by fgdfgddfg on Wednesday August 19, 2020 @11:05PM (#24219443)
That was the goal with Servo, but Mozilla axed them https://twitter.com/directhex/status/1293352458308198401
Re:Rust and C++ Interoperability in Chrome by M2Ys4U on Thursday August 20, 2020 @06:30AM (#24221806)
Servo was always a research project around writing a rendering engine and not an attempt to create a whole new browser product.
Re:Rust and C++ Interoperability in Chrome by mitchtbaum on Friday August 21, 2020 @03:21PM (#24238014)
Webrender would work better as the complete OS interface than as an engine for one browser/app.
Re:Rust and C++ Interoperability in Chrome by bsder on Wednesday August 19, 2020 @08:34PM (#24218591)
> 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.

Re:Rust and C++ Interoperability in Chrome by emptyparadise on Wednesday August 19, 2020 @08:49PM (#24218691)
If only a certain foundation's corporate half didn't fire its Rust browser developers.