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

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

    2. Re:Courage. by serviscope_minor · · Score: 2

      In C or C++ it's far too easy to allocate memory and forget to free it

      Leaks are memory safe though and the borrow checker doesn't help there. With Rust as with modern C++ though, you have to go pretty far out of your way to leak. Everything else though, Rust does help with.

      --
      SJW n. One who posts facts.
  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: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.

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

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

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

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

  11. Re:Rust will be what replaces C/C++ by Khyber · · Score: 2

    " Not to mention that it has even taken much longer for big changes in C++ to be adopted than Rust has existed"

    And the reason for that is TESTING. That's right, the people that made C++ actually bothered to test this shit themselves, instead of just releasing shit to people to test because they're too fucking lazy to do it themselves, like 95% of programming languages made and released today.

    --
    Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
  12. 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.

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

  14. Re:99.9% perfection X 14 million lines = 14,000 fl by fahrbot-bot · · Score: 2

    The idea that you shouldn't use reliable tools because humans should just be perfect is silly.

    I'm not advocating that at all, but Rust will have flaws (and limitations) too. It's a trade off, maybe a good one. But saying we need to Rust because "human's haven't got the brains to write secure code" (from the original post) is dumb. And, sure, Rust may "improve the situation by enforcing things that humans get wrong", but people can learn to get those things right too so it's not the only option. Good tools can be helpful, but they almost always come with a price. In this case, more limited distribution. If that's a price Mozilla is willing to pay (and it seems they are) so be it. Note: They seem willing to pay (give up) a bunch of stuff to pursue whatever their long-term goals are.

    --
    It must have been something you assimilated. . . .
  15. Re:Rust will be what replaces C/C++ by Hognoxious · · Score: 2

    I thought it went.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  16. 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.
  17. Re:Assembly language is good enough for anyone... by MightyMartian · · Score: 2

    That's what I've been saying about nosql for a long time now.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  18. Re:LLVM requirement? by GameboyRMH · · Score: 2

    Why is this modded Troll? Admittedly my understanding of the amount of RAM required was out of date - 8GB is recommended and a 2GB absolute minimum is required. It requires 30GB(!) of disk space:

    https://developer.mozilla.org/...

    --
    "When information is power, privacy is freedom" - Jah-Wren Ryel
  19. 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.

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

  21. Re:99.9% perfection X 14 million lines = 14,000 fl by flux · · Score: 2

    And you imply that when code is revised, flaws are always removed and never added?

  22. require Rust to compile successfully, by cheekyboy · · Score: 2

    Sounds like its only used for COMPILING, not runtime.

    So wtf, is the point of rust? I am sure perl would work equally as well.

    --
    Liberty freedom are no1, not dicks in suits.
  23. Re:Assembly language is good enough for anyone... by Anonymous Coward · · Score: 2, Interesting

    Mozilla have repeatedly shown that they won't tolerate opposing opinions and will fire you if your opinions are not in line with theirs. They chased out Brendan Eich because his opinions and they promised to hunt down and fire a Mozilla employee who posted his opinions online:

    http://www.dailydot.com/debug/mozilla-reddit-hate-speech-firing/

    So, not only do we have two clear cases of them chasing programmers out, they've probably deterred a great many other programmers from wanting to join. I would therefore say his claim that "Mozilla has chased the good programmers away because they didn't agree with some SJW agenda" is simply a statement of fact.

    Also, I'm offended by your comment. I think you should check your Rust code of conduct to see how you should respond to this:

    And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize.

    I expect an apology immediately, otherwise you're banned from using Rust.

  24. Re:Assembly language is good enough for anyone... by squiggleslash · · Score: 2

    The OpenBSD team's main forte is auditing and fixing code, rather than creating new code. The "new" parts of OpenBSD, that didn't originate somewhere else, take a very long time to develop and mature as a result.

    OpenBSD started as a fork of NetBSD. It's not like Theo wrote the entire thing from scratch.

    --
    You are not alone. This is not normal. None of this is normal.