Ask HN: How is Rust used in the Linux kernel today?
Funny you ask, I was wondering the same thing last night so I went through the rust-for-linux mailing list archive. This thread is pretty telling:<p><a href="https:&#x2F;&#x2F;lore.kernel.org&#x2F;rust-for-linux&#x2F;bddea099-4468-4f96-2e06-2b207b608485@usi.ch&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;lore.kernel.org&#x2F;rust-for-linux&#x2F;bddea099-4468-4f96-2e...</a><p><a href="https:&#x2F;&#x2F;lore.kernel.org&#x2F;rust-for-linux&#x2F;c61a60ef-fa9d-44ea-9852-ae7b18bc1ab1@lunn.ch&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;lore.kernel.org&#x2F;rust-for-linux&#x2F;c61a60ef-fa9d-44ea-98...</a><p>The above thread is really strange that they picked such a niche thing in networking to contribute to, as sockets don&#x27;t have many uses within the kernel itself other than NFS or dhcp or stuff like that. They should have aimed to add things to the QoS layer, qdisc, classifier, whatever, there&#x27;s tens of those and you can easily add another. Start small.<p>The problem really is that the people who want to see Rust in the linux kernel have next to no linux kernel background and have a poor understanding of how Linux works and how things are generally done.<p>Also the people who contribute big things to the linux kernel usually have a clear business case behind them and a big company paying them to work on it full time.<p>For example I could imagine Microsoft eventually contributing in this regard, say they want some more Hyper-V virtual hardware drivers in Linux and they decided to do that in Rust. They&#x27;ve been lately using Rust in the Windows kernel so it&#x27;s not that unrealistic to think it may happen.<p>A filesystem written in Rust would be cool... but it&#x27;s probably going to have to be a new one rather than a rewrite, I can&#x27;t imagine people going through the trouble of rewriting btrfs in Rust. And big names like Facebook could actually back that effort.<p>I really love using Rust for middleware things, however right now I can&#x27;t convince myself to use it on low level things like OSes or microcontrollers since it seems to be a lot of trouble with getting Rust to play nice with FreeRTOS for example, and there seems to be no production ready rtos written in Rust either.