9 ms·
Supporting the use of Rust in the Chromium project
- AceJohnny2 4y agoConsidering how Rust started as a way for Mozilla to make the Firefox browser more robust, it's kind of fun to see this sort of closing of the loop.
- tester756 4y agoIt shows how good their tech is that even their "competition" wants to get it
- UltraViolence 4y agoIt also shows the poor management Mozilla has since they effectually cut-loose the Rust team and aren't investing too much in rewriting parts of FireFox in Rust. Rust would've been a great USP for FireFox. They squandered it and now the competition is running with it. Both Google and Microsoft are all-in with Rust.
- Gigachad 4y agoMozilla is too busy trying to build online censorship tools and VR junk to bother with making their browser more secure.
- smoldesu 4y agoMicrosoft and Apple are building pack-in browsers that users neither love nor hate. Brave is trying to sustain themselves on a comedy routine of a cryptocurrency, and Google is 30 seconds away from relapsing into web domination. Relative to the rest of the circus, I'd say Mozilla is doing an okay job.
- thrwawy74 4y agoAs a sidenote, I had the impression Brave was some cryptocurrency delusion too. They have a much more extensive list of privacy modifications than Firefox does. I was impressed on a 2nd look, and you opt-in to the crypto nonsense.
- smoldesu 4y agoThere are worse things than supporting cryptocurrency in your project, but Brave's implementation is downright nefarious. BAT was a funnel that led directly into the developers pockets, it didn't even pretend to be pro-community. I don't trust Brave any more than I trust Google, since ultimately they're both funded by dwindling ad revenue.
- djhn 4y agoWhile I don't disagree, there is nothing wrong with Apple and Microsoft making perfectly adequate, boring browsers. Eliciting strong emotions is an anti-feature, surely!
- smoldesu 4y agoI agree, so long as I'm not forced to use their boring browser.
- ilikehurdles 4y agoWhat is this in reference to?
- lolinder 4y agoRewriting in Rust is not necessarily a good idea for any given project, and Google is almost certainly not going to be proactively rewriting large amounts of Chrome in Rust any more than Mozilla is. The reason is that bugs exist primarily in new code, not code that has been untouched for a long time. While you may solve some latent memory issues by rewriting in Rust, you're likely to introduce new regressions as well which may be much worse. It makes much more sense to focus on writing your new code in the safe language and gradually migrate things only when they would require a substantial rewrite anyway.
- aidenn0 4y agoThere are parts of mozilla that will need significant rewrites anyways, and writing parts of those in Rust could be a win if they can keep the interfaces clean.
- swsieber 4y agoAnd they did that for a while; my understanding is that letting the rust language team didn't stop that, but that's mostly a guess.
- tialaramex 4y agoRight, the finding from Google's Android team was that security bugs tend to be in new code, and so therefore choosing a safe language for new code is a much bigger win than rewriting stuff that you weren't going to change otherwise and which might be fine.
- tadfisher 4y agoI hope they took into consideration a corollary: that new code often _exposes_ bugs in the old, by exercising untested code paths or just by breaking assumptions. When a bug arises this way, do you attribute it to the new code or the old? A good takeaway is that the old code should not have exposed paths that didn't yet have a consumer. I frequently fall into the trap of making my code too general to support future use cases, and this usually ends up being rewritten when those use cases are actually implemented, or the code is just dead for the lifetime of the project.
- AceJohnny2 4y agoI don't blame Mozilla. They're in a tough situation, with their star product, Firefox, trending at Opera-levels of Market share. They're scrambling to find revenue, and funding a blue-sky effort like Rust, as great as it is for the industry, just isn't something they can afford.
- UltraViolence 4y agoRight now they don't have a unique selling point (USP). Rust could've been that selling point but they instead focused on making divisive UI changes and adding subscriptions. Also their crusade against taking money from Google is ill-conceived. There's simply no other source of revenue for a web browser (unless they start their own search engine, but that would be suicide since Google would immediately cut off their funding). They should focus on building the best and most secure browser and then their market share will almost certainly improve.
- jbirer 4y agoThe CEO has to get her 2.5 million / year somehow.
- UltraViolence 4y agoThe management team should've been fired along time ago. But they essentially hijacked Mozilla. All the trademarks and copyrights belong to the Mozilla Corporation, not the Foundation. Management are filthy crooks, scum and carpetbaggers.
- speed_spread 4y agoI'm sure she feels like it's peanuts and that she's doing Mozilla a favor.
- dblohm7 4y ago> and aren't investing too much in rewriting parts of FireFox in Rust. False. You haven’t been paying attention.
- MarkSweep 4y agoThere has been cross pollination in the other direction as well: https://hg.mozilla.org/mozilla-central/file/tip/ipc/chromium https://hg.mozilla.org/mozilla-central/file/tip/ipc/chromium
- deleted 4y ago[deleted]
- thrwawy74 4y agoIt's infuriating how Mozilla dropped the ball with Rust. Rust is successful, and Mozilla could have been the guardian behind the language. They gave away their biggest innovation in years. I installed Firefox on Windows Yesterday and walked through picking my culture-defining theme colors for the UI and then I made myself a stiff drink.
- jeswin 4y ago> Rust is successful, and Mozilla could have been the guardian behind the language. How does being the guardian behind the language help Mozilla in any way?
- thrwawy74 4y agoGoogle always had the ability to use Rust in any of its projects. However, I think Mozilla pissed away the biggest opportunity they had in a decade to lead something that will change an industry, and to influence (positively) the community around it. I certainly trust Mozilla over Google, though I'm still mad about that Mr. Robot extension. Google has all the resources and hundreds of engineers to throw at Rust. They will definitely have undue influence on the language and its community now that it's in Chrome. I just hope it doesn't wind up looking like Kotlin.
- huggingmouth 4y agoRelevancy, mindshare and attracting talent.
- allisdust 4y ago
- AdmiralAsshat 4y ago> Rust was developed by Mozilla specifically for use in writing a browser, so it’s very fitting that Chromium would finally begin to rely on this technology too. Thank you Mozilla for your huge contribution to the systems software industry. Rust has been an incredible proof that we should be able to expect a language to provide safety while also being performant. Somewhere, the laid-off Mozilla Servo team just took a swig from their hip flask.
- deleted 4y ago[deleted]
- jackmott42 4y agoThey might be at Google now.
- deleted 4y ago[deleted]
- a_bonobo 4y agoThe three biggest contributors on Github [1] are https://github.com/Ms2ger https://github.com/Ms2ger - at Igalia in Spain https://en.wikipedia.org/wiki/Igalia https://en.wikipedia.org/wiki/Igalia https://github.com/emilio https://github.com/emilio - still at Mozilla? https://github.com/jdm https://github.com/jdm - works at CashApp https://en.wikipedia.org/wiki/Cash_App https://en.wikipedia.org/wiki/Cash_App [1] https://github.com/servo/servo/graphs/contributors https://github.com/servo/servo/graphs/contributors
- bfrog 4y agoIt's just amazing how industrious and creative a small group at Mozilla was in order to boot strap Rust. Cheers to Graydon and Mozilla. Let an elevator never fail you again.
- KyeRussell 4y agoAt this point I just internally assume that ‘general purpose’ C/C++ codebases that aren’t at least open to the idea of Rust are the “if your code has memory issues, you’re just an idiot, except for the times that my code has had memory issues” types of C developers. More browser code being written in a language with fewer footguns is always cause for celebration
- maccard 4y agoC and C++ codebases are two very different things. I work on a large c++ project, and our compile times are awful. From my limited experience, moving to rust would absolutely ruin our compile times.
- cschep 4y agoI know rust compile times aren't great but.. are they WORSE than C++?? yeesh.
- maccard 4y agoYeah, they are. The compile times on the toy rust projects I've worked on are in the same region of my work c++ projects.
- aliqot 4y agoIn my experience, yes.
- sli 4y agoThere are a few things you can do to help it. The Bevy project has a section of their setup documentation that lists a few strategies[0]. In general though it can be relatively pretty slow. [0]: https://bevyengine.org/learn/book/getting-started/setup/#enable-fast-compiles-optional https://bevyengine.org/learn/book/getting-started/setup/#ena...
- meindnoch 4y agoBy a wide margin.
- hkalbasi 4y ago[dead]
- deleted 4y ago[deleted]
- UltraViolence 4y agoI believe Google is putting too much effort into bringing interop between C++ and Rust. Why not simply rewrite the core of Chromium in Rust? I mean, if a handful guys at SerenityOS can write a web browser from scratch in just a few years surely Google can muster enough manpower to rewrite Chromium in Rust in a couple of years? Interop is wasteful since there's a large discrepancy between C++ and Rust code. Trying to plug the holes will lead to an inferior product at great cost.
- steveklabnik 4y agoHow would the "core" be Rust and the rest of it be in C++, yet there be no "interop"?
- encryptluks2 4y agoThe Serenity browser wasn't much better than netsurf last time I checked, in fact it was in many ways worse so I don't think they really compare in any substance at this point. Why don't you do it if it is so easy?
- azakai 4y agoSerenityOS's LadyBird browser is an impressive project, but it doesn't prove that you can rewrite something like Chromium in a few years. It does prove you can get something working. But it will take many more years to actually get to feature parity given the long tail of web APIs. It will also take many more years to be competitive on performance with existing engines. And even if you use a memory-safe language you'll be introducing many other bugs along the way. This doesn't diminish the LadyBird browser in any way! It can still be useful for many people in many ways.
- raggi 4y agoThis is a really good thing, and having been through this in other Google projects, a sincere congratulations to the folks who demonstrated the tenacity to keep pushing forward despite both I'm sure a lot of genuine hard questions being asked, and a lot of fud. This outcome will be good for users in the long run.
- raphlinus 4y agoAmen brother.
- aidenn0 4y agoWhen the number of stakeholders exceeds some relatively small number N, it becomes very hard to distinguish good, tough, fair questions from FUD and obstructionism. I imagine the Chromium project easily exceeds that N.
- raggi 4y agoYes, absolutely. Also to be clear: people aren't implicitly at fault for asking questions rooted in fud. Caring is a good thing, and so is trusting your intuition, and speaking up. The challenge is working through it all quickly and collaboratively.
- urthor 4y agoIf you phrase the question "is there a way to prevent" usually it all goes well. Working with folk who understand that nuance is the tough part.
- aidenn0 4y agoOh indeed. Sometimes people repeat FUD just because they feel like they need to say something and they aren't well informed. Other times people do so because they are honestly concerned. Unless you know the person, it can be hard to differentiate.
- nigrioid 4y agoThis will end the Chrome/Blink monopoly.
- muricula 4y agoWhy do you think the choice of programming language will change the usage of a browser or its engine?
- nigrioid 4y agoIt's not really about the language itself but the people and politics surrounding it.
- vgatherps 4y agoTo be clear your claim is that because Google chrome has some use of a programming language where the community leans left, people are going to meaningfully stop using chrome? Some people are so fragile…
- adamdusty 4y agoMaybe I'm wrong, but I don't think they're talking about state level politics.
- vgatherps 4y agoMaybe I’m missing some recent events but I’ve only heard or seen anything political in regard to state political leanings and especially “identity politics”. Just feels weird to feel so strongly about that aspect of a programming language. If people held a principled view they’d be horrified of how militaries use anything and everything mainstream.
- adamdusty 4y agoI'm pretty sure they're talking about the community politics. There has been plenty of drama around rust.
- moloch-hai 4y agoIt must have been embarrassing to have had to write that. Anyway I would be embarrassed. "Our existing code is a whole mountain range of mud. We hope new code written in this new language will be less so." Anyway it will be much slower to write bad code in it, with the compiler kvetching the whole time, so the rate of accumulation of bad code will necessarily be lower.
- saagarjha 4y agoIt should not be embarrassing to identify shortcomings of your past, especially those that arose from decisions that were reasonable at the time.
- moloch-hai 4y agoThe same people who wrote the bad old code will be writing the new code. They may hope that it will be better code, but a big ball of mud is a big ball of mud, whatever the language. I don't agree that the decisions at the time were reasonable. Coding in Google-dialect C++ was a spectacularly bad choice, evident even then. Each day they stick to it is another equally bad choice, well into thousands now.
- cmrdporcupine 4y agoChrome is written by hundreds of people. It's an absolutely massive codebase.
- moloch-hai 4y agoYes. Hundreds of people are writing it even now, adding to that massive codebase. The people writing code in Rust will mostly be drawn from among those same people. They might not be the ones who have been coding the bugs. If not, the new code will, perforce, not be less buggy. If they are the ones who have been coding the bugs, we should expect new bugs.
- DannyBee 4y ago
- skybrian 4y agoI wonder if there are particular Rust crates that they want to reuse? It might be interesting to see what they start using first.
- deleted 4y ago[deleted]
- blub 4y ago1. Google strangles Firefox through advertising for Chrome as a better browser on their web properties, breaking Firefox on their web properties (the famous oopsies) and bundling the Chrome installer with installers for other software. 2. Google enjoys a browser monopoly and can dictate features as standards to support their data collection and advertising business. 3. Google thanks Mozilla from the bottom of their heart for developing Rust, so all is forgotten :-)
- lolinder 4y ago0) Google pays Mozilla hundreds of millions of dollars to keep it as the default searh engine. This sum represents most of Mozilla's revenue. I'm no fan of Google, but their relationship with Mozilla is complicated, not strictly adversarial.
- cyber_kinetist 4y agoThere’s also a slightly hidden reason: keeping Mozilla’s Firefox as a competitor lets you get away with being hammered by antitrust regulations (which Microsoft already had the experience with IE)
- kaba0 4y agoThat money is much much less than an otherwise following monopoly lawsuit would cost them. It is more like a symbiotic relationship on this account.
- liberty-bzmh 4y ago[flagged]