Slashdot Mirror


Tor Browser Will Feature More Rust Code (bleepingcomputer.com)

An anonymous reader writes: "The Tor Browser, a heavily modified version of the Firefox browser with many privacy-enhancing features, will include more code written in the Rust programming language," reports BleepingComputer. In a meeting held last week in Amsterdam, Tor developers decided to slowly start using Rust to replace the C++ code. The decision comes after Mozilla started shipping Rust components with Firefox in 2016. Furthermore, Rust is a memory-safe(r) language than C++, the language used for Firefox and the customized Tor code, which means less memory corruption errors. Less of these errors means better privacy for all.
"Part of our interest in using safer languages like Rust in Tor is because a tiny mistake in C could have real consequences for real people," Tor developer Isis Agora Lovecruft posted on Twitter, adding "Also the barrier to entry for contributing to large OSS projects written in C is insanely high."

4 of 149 comments (clear)

  1. Re:And the barrier for Rust isn't? by ljw1004 · · Score: 5, Informative

    You want an app that's supposed to protect your security online to be written by someone who hasn't studied or used the language but decided they could do well enough "within a day"? Yeah, no thanks.

    Honestly, yes. A clean language like Rust means that you won't get problems due to misuse of the language no matter how new you are to it; only due to misunderstanding of algorithms or architecture or security principals. The whole point of the comparison with C is that after a decade of experience in C you'll still find accidental security flaws due to unspotted buffer overruns or read-after-free.

  2. Re:And the barrier for Rust isn't? by IAN · · Score: 4, Informative

    Quick goggle tells me that rust compiler is written in C.

    That's why nobody seriously uses Goggle. Now if you tried Google, you'd get a snippet mentioning a "self-hosting compiler written in Rust" as the first result.

    (Yes, Rust's code generation backend is LLVM, written in C++. Don't try to build strawmen out of this.)

  3. Re:Well rust must be reallllly good... by K.+S.+Kyosuke · · Score: 4, Informative

    What would happen if someone wrote, say, a kernel, in C!?!

    The thing you observe around you right now: holes in kernels, servers, browsers, virtual machines, regular security announcements... (Because everyone decided to repeat the same mistake.)

    --
    Ezekiel 23:20
  4. Can somebody mod down ljw1004's disinformation? by Anonymous Coward · · Score: 2, Informative

    I'd expect a good developer, who's already familiar with other languages, to be contributing good PRs in Rust within a day.

    This is not true at all.

    Can somebody please mod down ljw1004's disinformation? I don't think he's ever even used Rust. Anybody who has actually used it would never make the claim that he just made.

    Rust is not an easy language to learn.

    Even people with extensive academic experience, years of industry experience, and an excellent understanding of a complex language like C++ will find Rust's learning curve to be steep. "Lesser" programmers will have a much, much more difficult time with it.

    Based on my experience and that of a number of very experienced and skilled programmers that I know, it would take at minimum of 2 weeks for a talented programmer to become barely proficient with it. Two or three months is a more reasonable time frame for an average programmer.

    Rust is not a language like Java, C#, Python, or Go, where a good C++ programmer can be writing high-quality code within a few days. It's much more like Haskell, where even experienced practitioners need a lot of time (measured in weeks or months) to truly understand its concepts and nuances.

    Anyone who claims that Rust can be learned well "within a day" is full of bullshit.