News for hackers. Stuff that matters.
Re:Linus Torvalds on Rust support in kernel by HelloNurse on Friday April 16, 2021 @11:08AM (#26834806)
Section 3.16 ("Platform and target support") of the linked document is so inadequate for Linux kernel related questions, such as "what compilation targets will be supported by this Rust Edition in 10 years", that there is nothing to quote to show it's inadequate. It doesn't even tell what compilation targets are supported right now.
Re:Linus Torvalds on Rust support in kernel by steveklabnik on Friday April 16, 2021 @11:12AM (#26834861)
The canonical link for platform support is here: https://doc.rust-lang.org/stable/rustc/platform-support.html
Re:Linus Torvalds on Rust support in kernel by HelloNurse on Saturday April 17, 2021 @05:51AM (#26842988)
There is no commitment to keeping the platforms in tier 1, 2 or 3 for any length of time or to provide advance warning before platforms are degraded, not to mention that the tier 1 list is vastly insufficient (Arm64, x86, x86_64).

Rustc is clearly meant to compile Rust applications and use for the Linux kernel, which from the point of view of this document would be narrower than tier 1, is highly experimental.

Re:Linus Torvalds on Rust support in kernel by steveklabnik on Saturday April 17, 2021 @10:59AM (#26844691)
Where does Linux document how long platforms are guaranteed support? My understanding is there's not either.

(And yes, we'd love to expand the tier list. It's a chicken and egg situation. That being said, I work mostly in tier 2 and 3 targets, and they just vary a lot. The ones I work in work as good as tier 1 targets do. The path to moving forward is bright for many of these.)

> Rustc is clearly meant to compile Rust applications

I don't see what about this implies that at all. As a core team member and someone writing an embedded OS at work, I can assure you that we don't think of Rust as purely an application language.

Re:Linus Torvalds on Rust support in kernel by HelloNurse on Saturday April 17, 2021 @12:22PM (#26845408)
Maybe I'm unfamiliar with Rust, but if you list OSX, Linux and Windows on identical processors as different platforms they are platforms for applications, not for an OS kernel that runs on "bare metal": it implies that support includes relying on OS provided system calls to manage processes, implement the standard library, etc.
Re:Linus Torvalds on Rust support in kernel by steveklabnik on Saturday April 17, 2021 @12:42PM (#26845592)
Sure, the standard library on those targets depends on OS services. But you don’t have to use the standard library. Many people do write userspace programs in Rust, just like they do in C. That doesn’t mean that it’s only useful or intended for userspace, just like C.

It takes more work to port an entire standard library than to not.

Re:Linus Torvalds on Rust support in kernel by myrrlyn on Saturday April 17, 2021 @01:41PM (#26845991)
unless you plan to run `rustc` as a kernelspace application, anything in tier 2 (`core`, `alloc`, maybe `std` all compile and likely pass tests) is sufficient