19 votes

Rust takes a major step forward as Linux's second official language

5 comments

  1. sjvn
    Link
    Linux is getting more Rust in it by the day.

    Linux is getting more Rust in it by the day.

    8 votes
  2. [2]
    Wulfsta
    Link
    This is very exciting, but I haven’t written anything serious in Rust for a little while - can anyone comment on the state of the language? I’ve gotten the impression that it’s going down a...

    This is very exciting, but I haven’t written anything serious in Rust for a little while - can anyone comment on the state of the language? I’ve gotten the impression that it’s going down a similar path to C++ where it’s becoming a kitchen sink of features that make it less intuitive. Also has Chalk been finished yet? I remember that was supposed to bring some big improvements to the compiler’s understanding of lifetimes?

    6 votes
    1. mtset
      Link Parent
      I'm curious as to what has given you this impression. Certainly new features have been added, but to be honest, I don't see nearly as much churn in idiomatic Rust as one might expect. For example,...

      I’ve gotten the impression that it’s going down a similar path to C++ where it’s becoming a kitchen sink of features that make it less intuitive.

      I'm curious as to what has given you this impression. Certainly new features have been added, but to be honest, I don't see nearly as much churn in idiomatic Rust as one might expect. For example, the biggest recent change to the language is const generics, which are a limited form of dependent types; they permit some useful things, like functions that are generic over all arrays of any and all lengths, but don't introduce fundamentally new syntax (and don't require or even permit complex template metaprogramming, as in C++.)

      Steve actually did some research into this last year: https://steveklabnik.com/writing/how-often-does-rust-change

      6 votes
  3. [2]
    stu2b50
    Link
    I am a little worried about Rust in the core kernel as opposed to drivers. Not for any inherent issues, but because it would require a GCC backend (or frontend) to maintain compatibility with all...

    I am a little worried about Rust in the core kernel as opposed to drivers. Not for any inherent issues, but because it would require a GCC backend (or frontend) to maintain compatibility with all the targets the kernel has. Maintaining compatibility with both LLVM and GCC could prove to be limiting factor in both the linux kernel's willingness to accept Rust as well as put more load on the rust maintainers.

    In the end, though, that's their problem, I suppose, not mine. Given the whole class of critical bugs we have from even simple things like the lack of array bounds checking in C, I think it's a solid move, even if there has to be some unsafe blocks (+things like custom allocators for the std lib or not using the std lib).

    6 votes
    1. time
      (edited )
      Link Parent
      There's been some significant progress on a gcc backend being added to rust. You can find out the current state of things in this blog and this repo. They've been making quite a bit of progress to...

      it would require a GCC backend

      There's been some significant progress on a gcc backend being added to rust. You can find out the current state of things in this blog and this repo. They've been making quite a bit of progress to being able to use gcc as an alternate backend over the last year, though they do still have a ways to go.

      3 votes