Announcement

Collapse
No announcement yet.

Rust For Linux Kernel v9 Patches Trim Things Down Greatly For Easier Upstreaming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ssokolow
    replied
    I also got the impression that Linus was not a fan of a language which has "userland-first" design features like transparently adding a vtable member in your struct or class if you want to use the language's syntactic sugar for dynamic dispatch and a tendency to encourage people to think in failure-by-exception.

    Leave a comment:


  • cj.wijtmans
    replied
    Originally posted by kpedersen View Post
    I don't think anyone truly thought that a full fat Rust support was ever going to enter the kernel (and certainly not standard library, cargo, crates.io)

    Possibly why C++ struggled in Linux kernel space is because after stripping it down to the core useful parts, you are more or less back at C again. Rust will likely be no different.
    Thats the biggest load of bs i ever heard. C++ without STL is nothing like C whatsoever.

    i think what others said hits the mark better its to keep google facebook or whatever happy. Money is the root of evil.

    Leave a comment:


  • darkonix
    replied
    Originally posted by kpedersen View Post
    I don't think anyone truly thought that a full fat Rust support was ever going to enter the kernel (and certainly not standard library, cargo, crates.io)
    Many people here believe that because they didn't read the articles. That was clear from the comments.

    Possibly why C++ struggled in Linux kernel space is because after stripping it down to the core useful parts, you are more or less back at C again. Rust will likely be no different.
    Isn't the experimental implementation of Rust in the kernel that we are discussing here basically Rust reduced to its core and still useful? As you mentioned it doesn't has standard library nor cargo, but the pure language which is way more expressive than C and safe by default. It may still be a failed experiment but that was the main point, it still is safer than C.

    Leave a comment:


  • kpedersen
    replied
    Originally posted by jacob View Post

    C++ struggled in the Linux kernel because Linus wanted no part of it. Rust is different in that regard.
    Indeed. Rust would have failed very hard back then. But now Linus has commercial companies to keep happy.

    Leave a comment:


  • pmorph
    replied
    Originally posted by polluktus View Post
    Wouldn't be smarter to just finish rust kernel support first and then merge it to mainline than stripping it to minimal version making rust basically useless until some future merges?
    Dunno, but maybe smaller pieces will attract more people to review the stuff.

    Leave a comment:


  • Sergey Podobry
    replied
    Adding C++ is much easier than adding Rust and could be done decade ago. The current kernel heavily relies on GCC extensions (so it's not the standard C) and crazy stuff like:
    Code:
    #define __is_constexpr(x) \
    (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

    Leave a comment:


  • dlq84
    replied
    The reason why this is done can be read here: https://lkml.org/lkml/2022/8/2/462

    The rest will follow. No one think the rest is bad, just too large to have time to review it this merge
    window. Also so that different subsystem owners can review individual patches
    Last edited by dlq84; 05 August 2022, 04:07 PM.

    Leave a comment:


  • jacob
    replied
    Originally posted by kpedersen View Post
    I don't think anyone truly thought that a full fat Rust support was ever going to enter the kernel (and certainly not standard library, cargo, crates.io)

    Possibly why C++ struggled in Linux kernel space is because after stripping it down to the core useful parts, you are more or less back at C again. Rust will likely be no different.
    C++ struggled in the Linux kernel because Linus wanted no part of it. Rust is different in that regard.

    Leave a comment:


  • kpedersen
    replied
    Originally posted by polluktus View Post
    than stripping it to minimal version making rust basically useless until some future merges?
    I don't think anyone truly thought that a full fat Rust support was ever going to enter the kernel (and certainly not standard library, cargo, crates.io)

    Possibly why C++ struggled in Linux kernel space is because after stripping it down to the core useful parts, you are more or less back at C again. Rust will likely be no different.

    Leave a comment:


  • bachchain
    replied
    Originally posted by polluktus View Post
    Wouldn't be smarter to just finish rust kernel support first and then merge it to mainline than stripping it to minimal version making rust basically useless until some future merges?
    That's generally how Rust Lang development works. You ship a feature as a MVP, and then expand on it later based on user feedback rather than trying to create a complete product by guessing what people actually want.

    Leave a comment:

Working...
X