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

11 of 236 comments (clear)

  1. Re:Assembly language is good enough for anyone... by TechyImmigrant · · Score: 5, Informative

    What's with all these other languages lately?

    In the case of Rust, it addresses security problems that are the domain of internet facing software. When writing complex internet facing software, human's haven't got the brains to write secure code. Rust improves the situation by enforcing things that humans get wrong.

    For this reason, security people love it. They understand how they can write software with deterministic behavior in Rust where they know they cannot in C or many other compiled languages.

    Other people want different problems solved and look at Rust and think "Well that looks a bit inconvenient" and dismiss it, and continue to write browsers and servers and daemons and MTAs and other internet facing things full of security exploits.
     

    --
    I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  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.
    1. Re:Courage. by DrXym · · Score: 4, Interesting
      Rust is pretty easy to program in, more so that C or C++ in some ways, harder in others. It definitely has a mindset / steep learning curve associated with using it for the first time. In C or C++ it's far too easy to allocate memory and forget to free it (or free it multiple times), or stomp over the end of the buffer, or have two threads write to the same data, or call a pointer which isn't there.

      It is very hard to do those things in Rust and that what makes it an excellent systems programming language. It has equivalent performance to C or C++ - almost all checks are at compile time and compile away to nothing in the generated code, and yet the quality of the code is higher because there are less ways it can fail when it passes those checks. That's an extremely compelling argument for code that is expected to run for months or years without failure.

      Aside from the language itself, the std library is way better than for C++ and cross platform. And building software or pulling in external libraries is incredibly easy thanks to the package manager / build tool. It still has some rough edges, but nothing I would consider a blocker.

  3. Re: What the hell is "rust"? by Anonymous Coward · · Score: 5, Funny

    Best of all, if you have a problem with Swift, you can tailor swift to your needs and shake it off.

  4. Re:What the hell is "rust"? by Aaron+B+Lingwood · · Score: 4, Informative

    And why aren't they using Swift which is the de-facto best choice for next generation systems languages?

    Rust a) has been around longer; b) was developed by Mozilla; c) focuses on security of web engines; and d) is strong enough for system programming.

    Swift was a reaction to Rust, bringing some of the features and simplifying the Obj-C Syntax. It was designed with the Apple environment in mind and doesn't (officially) support windows. Swift as a choice makes zero sense as there is no real benefit as Mozilla is no longer trying to be hip.

    Mozilla is taking a risk and betting on the future of hostile internet - and users actually giving a shit about security.

    --
    [Rent This Space]
  5. Re:the future of Mozilla by geek · · Score: 4, Interesting

    A browser nobody uses written in a language nobody uses.

    Quick, let Dropbox know no one uses Rust. I mean they went and re-wrote their entire back end in it. If only they thought like you such a crisis could have been averted.

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

  7. Servo by jimbo · · Score: 4, Informative

    Given the quality of our comments recently, here is a good presentation with some actual information on their work currently and going forwards: Servo Architecture: Safety and Performance.

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

  9. ESR vs Rust by Jodka · · Score: 4, Informative

    That bizarre cathedral guy, Eric Raymond, is busy cleaning up NTP for security and recently evaluated Rust as a possible language for a complete re-write and found it deficient. His blog posts on that:

    "Rust vs. Go"
    Rust severely disappoints me
    "Rust and the limits of swarm design"

    --
    Ceci n'est pas une signature.
  10. 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.