Mozilla Binds Firefox's Fate To The Rust Language (infoworld.com)
An anonymous reader quotes InfoWorld:
After version 53, Firefox will require Rust to compile successfully, due to the presence of Firefox components built with the language. But this decision may restrict the number of platforms that Firefox can be ported to -- for now... Rust depends on LLVM, which has dependencies of its own -- and all of them would need to be supported on the target platform. A discussion on the Bugzilla tracker for Firefox raises many of these points...
What about proper support for Linux distributions with long-term support, where the tools available on the distro are often frozen, and where newer Rust features might not be available? What about support for Firefox on "non-tier-1" platforms, which make up a smaller share of Firefox users? Mozilla's stance is that in the long run, the pain of transition will be worth it. "The advantage of using Rust is too great," according to maintainer Ted Mielczarek. "We normally don't go out of our way to make life harder for people maintaining Firefox ports, but in this case we can't let lesser-used platforms restrict us from using Rust in Firefox."
InfoWorld points out most Firefox users won't be affected, adding that those who are should "marshal efforts to build out whatever platforms need Rust support." Since most users just want Mozilla to deliver a fast and feature-competitive browser, the article concludes that "The pressure's on not only to move to Rust, but to prove the move was worth it."
What about proper support for Linux distributions with long-term support, where the tools available on the distro are often frozen, and where newer Rust features might not be available? What about support for Firefox on "non-tier-1" platforms, which make up a smaller share of Firefox users? Mozilla's stance is that in the long run, the pain of transition will be worth it. "The advantage of using Rust is too great," according to maintainer Ted Mielczarek. "We normally don't go out of our way to make life harder for people maintaining Firefox ports, but in this case we can't let lesser-used platforms restrict us from using Rust in Firefox."
InfoWorld points out most Firefox users won't be affected, adding that those who are should "marshal efforts to build out whatever platforms need Rust support." Since most users just want Mozilla to deliver a fast and feature-competitive browser, the article concludes that "The pressure's on not only to move to Rust, but to prove the move was worth it."
What's with all these other languages lately?
Courage is not removing the headphone jack. Courage is switching to a new systems language because the existing one, while good, just doesn't allow them to reach th quality level they want.
SJW n. One who posts facts.
Yeah yeah. You guys have been saying that Rust will replace C and C++ for 7 years and yet it's still a toy that next to no one uses outside of Mozilla.
There are several forks. I'm typing this in Palemoon, a fork that didn't go along in the chromification process.
Good point. And I hate this idea! This transition is gonna make more harm than good.
I am a Firefox user from the very beginning and I see Firefox drifting for some time now. 99% of users really do not need more new features. We do not need a browser supporting all those stupid JS API's (WebRTC) and We do not care how much it scores at html5test.com - leave this crap for WebKit/Blink. Just make your engine render pages fast and correct, fix security bugs and you will make most of Your users more than happy. Maybe you should consider a lightweight fork of your browser?!
Uh, nope.
From WIkipedia:
(emphasis added)
However, I'll grant that LLVM is written in C++.
-- Alastair
Someone who has truly mastered their craft may perfection 99% of the time. Or not - Tom Brady completes 64% of his passes.
Suppose the Firefox programmers were the most competent human beings to ever walk the earth, and got it right 99.99% of the time. With 14 million lines of code, they would have 14,000 flaws.
On the other hand, if the Rust string handling functions don't permit buffer overflows, they don't permit buffer overflows - ever. You can't write a buffer overflow in a language that doesn't use buffers. Not only will there not *be* such errors, but you can *prove* there are no such errors, you can trust it.
I don't have any opinion on Rust specifically, good or bad. I'm sure it has tradeoffs. The idea that you shouldn't use reliable tools because humans should just be perfect os silly.
Mozilla is tackling the security of the OS, like buffer overflows, while the attackers are tackling the security of the web, like tracking users, using csrf and similiar stuff.
Mozilla should start with tuning firefox for privacy. The typical problem with a buffer overflow is a crash. Even when they get user privileges, they won't find much interesting on most user's PCs. The interesting stuff happens in the Browser. The Webmail-Login is more valuable to the average user than the few files in his user profile. The Facebook Login worth more than the PC, which can be replaced by a tablet, when it becomes slow because of viruses.
Of course this isn't true for every user, but for the majority. And mozilla should not stop fixing bugs and programming for security, but actually inventing a new programming language to fix potential issues arising from wrong usage of C is just overkill. Of course you can do it, if you have too much time, but then i point at the bugtracker with seven figure Bug-IDs.
The Accidental Tech Podcast had an interview with Chris Lattner where he discussed the future of Swift as a systems language and compared it to Rust. Rust has a very upfront memory ownership model that requires programmers to be explicit about memory management. This allows Rust to have great performance and allows the compiler to ensure memory is used safely that is not an option with C.
With Swift, either you pretty much don't think about memory (it uses Automatic Reference Counting so you only need to care about cycles), or you need to go down to C-style memory semantics with the various Unsafe constructions. There are cases where you could get much better performance because the programmer knows the lifecycle of the objects being used, but that can't currently be expressed in Swift. It can be expressed in Rust.
To be a good systems programming language, Chris said that Swift will need to create a memory ownership model (and mentioned Rust as having ideas that might apply). He would like that ownership model to be opt-in for specific pieces of your code that require it: most people could use ARC, while people that need performance in a specific piece could be more detailed about the memory management. It's on his list of things that Swift will acquire over the years so it can achieve world domination.
So there are really pretty good reasons that Mozilla put together Rust. The browser is probably the most widely exposed attack surface right now, and the history of buffer overloads means there needed to be a safer way to code.