Announcement

Collapse
No announcement yet.

Linux's VGEM Kernel Driver Being Rewritten In Rust

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

  • sinepgib
    replied
    Originally posted by aht0 View Post
    Yep, and from that point, why gradually not do more?
    Rust bindings/support in such manner I'd really like to see in FreeBSD as well.
    I see several ways it could end up in an incomplete migration:
    - Friction with some more reluctant developers (not everyone is on board with Rust AFAIK), some of whom may be maintainers (so they have a call about whether or not Rust makes it into their subsystem).
    - Some parts are simply not worth the extra effort, say, several architectures and drivers have had only minor bug fixes and corrections to fit interface changes for years. I don't think they will drop them only to avoid migrating them to Rust, as long as they don't get in the way of migrating the rest.
    - Some parts may either be deemed too sensitive for a rewrite or it may simply not be that beneficial for that case to migrate to Rust (say, trivial code that you can really be sure has no memory safety/UB bugs).

    I think stuff will be migrated on an as-needed (particularly buggy areas) and/or opportunistic (no need to keep doing new development in C) basis, rather than just go all in.

    Leave a comment:


  • gosh000
    replied
    Originally posted by Sethox View Post

    This is the sort of spreading news that makes me want to learn Rust myself, because then it's possible to contribute myself in the Linux Community (and beyond).
    The book provided by the community is very good written - https://doc.rust-lang.org/book/

    Leave a comment:


  • ssokolow
    replied
    Originally posted by sinepgib View Post

    I wouldn't bet for the whole kernel, but I certainly see most new drivers being done in Rust in the near/medium term.
    Given Asahi Lina's experience of it, I wouldn't doubt it.

    Leave a comment:


  • aht0
    replied
    Originally posted by sinepgib View Post

    I wouldn't bet for the whole kernel, but I certainly see most new drivers being done in Rust in the near/medium term.
    Yep, and from that point, why gradually not do more?
    Rust bindings/support in such manner I'd really like to see in FreeBSD as well.

    Leave a comment:


  • sinepgib
    replied
    Originally posted by aht0 View Post
    Bets Linux kernel's gonna be gradually rewritten in Rust.
    I wouldn't bet for the whole kernel, but I certainly see most new drivers being done in Rust in the near/medium term.

    Leave a comment:


  • aht0
    replied
    Originally posted by Mario Junior View Post
    Rewrite rust in rust too.
    Bets Linux kernel's gonna be gradually rewritten in Rust.

    Leave a comment:


  • sinepgib
    replied
    Originally posted by Sethox View Post

    This is the sort of spreading news that makes me want to learn Rust myself, because then it's possible to contribute myself in the Linux Community (and beyond).
    Not saying it's not a good idea, but note that you can do that learning pretty much any language.

    Leave a comment:


  • mether
    replied
    Originally posted by ids1024 View Post

    Rust's compiler has been written in Rust for a long time. Though the earliest prototypes were in OCaml.

    But it does use LLVM for codegen.
    -

    Yes, Rustc is written in rust (Other rust compilers including mrustc and gcc-rs uses C++). However the usage of LLVM is why I was using the Google Go compiler example which does not use LLVM and uses Go entirely. This is technically feasible for Rust as well but probably not worth losing out on leveraging LLVM.

    Leave a comment:


  • ids1024
    replied
    Originally posted by RahulSundaram View Post

    Not really. It is a fairly common step in a language to write the compiler in the language itself after a point. Go did this a few years back for example.
    Rust's compiler has been written in Rust for a long time. Though the earliest prototypes were in OCaml.

    But it does use LLVM for codegen. rustc_codegen_cranelift isn't really meant to replace that so much as to offer an alternative specifically for faster unoptimized builds, while LLVM would still offer more performant optimized builds. (And cranelift itself was created for use as a WASM JIT. Not initially/specifically for compiling Rust.)

    Leave a comment:


  • mether
    replied
    Originally posted by Mario Junior View Post

    You most be kidding me... 😂
    ​
    Not really. It is a fairly common step in a language to write the compiler in the language itself after a point. Go did this a few years back for example.

    Leave a comment:

Working...
X