Slashdot Mirror


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."

12 of 236 comments (clear)

  1. Assembly language is good enough for anyone... by QuietLagoon · · Score: 1, Insightful

    What's with all these other languages lately?

    1. Re:Assembly language is good enough for anyone... by ArchieBunker · · Score: 1, Insightful

      Funny how the OpenBSD team doesn't have that problem.

      --
      Only the State obtains its revenue by coercion. - Murray Rothbard
    2. Re:Assembly language is good enough for anyone... by pseudofrog · · Score: 3, Insightful

      Holy shit. Is there any problem/non-problem you all *won't* blame on "SJWs"? I'm calling this phenomenon Pseudofrog's Law: Literally anything that can or can't be blamed on SJWs will be blamed on SJWs.

    3. Re:Assembly language is good enough for anyone... by Ramze · · Score: 4, Insightful

      Great. Here's some sand. Bake me an intel-compatible x86 chip. The specs are all out there, and it's unencumbered by patents.

      What's that? You need a wafer oven and a lithography machine? pffft. no kiddin'.

      You sometimes have to make a tool to make a tool to make a tool that will make the tool you need to do the job. Human hands don't have the dexterity to cut a silicon wafer, nor do human eyes have the ability to see to do it... nor do human minds have the capacity to construct and memorize a proper layout -- we use computers to do that for us. An amazing amount of chip design is automated with most of the details worked out by complicated algorithms.

      Same is true of software. We build frameworks and modules and libraries and use compilers for various languages because no one on the planet can create the binary for a massive modern program using only their head and a pen and pad and hand-feed it into the machine with punch cards.

      If you don't understand this concept, you are truly lost.

  2. Courage. by serviscope_minor · · Score: 5, Insightful

    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.
  3. Re:Rust will be what replaces C/C++ by Desler · · Score: 2, Insightful

    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.

  4. Re:Stick a fork in Mozilla! They're done! by johanw · · Score: 4, Insightful

    There are several forks. I'm typing this in Palemoon, a fork that didn't go along in the chromification process.

  5. Re:the future of Mozilla by Anonymous Coward · · Score: 0, Insightful

    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?!

  6. Re:Tell us, Einstein, what is Rust written in? by AJWM · · Score: 3, Insightful

    Uh, nope.

    From WIkipedia:

    The language grew out of a personal project by Mozilla employee Graydon Hoare, who stated that the project was possibly named after the rust family of fungi.[11] Mozilla began sponsoring the project in 2009[10] and announced it in 2010.[12] The same year, work shifted from the initial compiler (written in OCaml) to the self-hosting compiler written in Rust.[13] Known as rustc, it successfully compiled itself in 2011.[14] rustc uses LLVM as its back end.

    (emphasis added)

    However, I'll grant that LLVM is written in C++.

    --
    -- Alastair
  7. 99.9% perfection X 14 million lines = 14,000 flaws by raymorris · · Score: 4, Insightful

    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.

  8. Re:What the hell is "rust"? by allo · · Score: 2, Insightful

    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.

  9. Re:What the hell is "rust"? by Alan+Shutko · · Score: 3, Insightful

    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.