|
|
Subscribe / Log in / New account

Rust in the 6.2 kernel

Rust in the 6.2 kernel

Posted Nov 19, 2022 11:06 UTC (Sat) by gasche (subscriber, #74946)
In reply to: Rust in the 6.2 kernel by Wol
Parent article: Rust in the 6.2 kernel

I can see many reasons why kernel-side programming is a different enough environment to need its own stdlib, and there is nothing fundamentally wrong with that. But on the other hand, I would expect some principles about how to grow this kernel-stdlib. (Some people have experience growing standard libraries for languages/environments and some idea are probably worth porting over from the start.)

For example (this is just a random idea, not a suggestion or anything) Rust-in-kernel could have decided to minimize the diff with outside-kernel Rust code by sticking to subsets of standard APIs or well-known third party packages whenever possible, or taking other steps to avoid divergence and reuse existing design choices. I see no trace of such a process in the [Either patchset](https://lwn.net/ml/linux-kernel/20221110164152.26136-28-o...), which does not make any mention of pre-existing Either code in Rust outside the kernel.


to post comments

Rust in the 6.2 kernel

Posted Nov 19, 2022 11:19 UTC (Sat) by khim (subscriber, #9252) [Link]

Rust doesn't have Either in it's stdlib. There are either crate with really featureful Either, and it's widely used, but from my understanding Linux kernel doesn't like to depend on external crates.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds