moss-kernel: Rust Linux-compatible kernel
48 points by yokljo
48 points by yokljo
This looks cool. I keep saying that if something is going to succeed Linux, it needs Linux binary compatibility (including things like keeping sysfs mostly compatible).
What I'd like to see in one of these projects is Linux driver compatibility in some form, to piggyback on Linux drivers that haven't been ported/rewritten natively yet (there are many ways this could be done, from a kernel API compatibility layer to virtualization/UML tricks to run Linux on the side). I think a project combining those two things has a real chance of slowly gaining adoption and momentum. Without them, it's too much of an uphill battle.
Even better, piggy back on windows drivers
Linux runs on way more systems than Windows, has out of the box support for vastly more hardware, and is open source. Windows drivers almost always are designed to work only with Windows software (installers, configuration UI, etc.), never mind the licensing/redistributability issues. They make no sense outside the Windows ecosystem. And for all its problems and lack of stability, the Linux driver APIs at least attempt to have proper layering and code reuse, while on Windows vendors get to reimplement all sorts of things in different ways. Plus, how would you even fit Windows drivers into a Linux userspace API at all? You're basically building half of Wine, backwards (Microsoft tried to do that with WSL1 and gave up, now WSL2 is... just Linux in a VM)
I think what you're trying to say is "make Windows drivers work so vendor support works like Windows" but sadly that's not how it works. And honestly, you don't want what vendors are doing on Windows. It's a giant mess. Sure, it works, mostly... but no Windows user enjoys how drivers are managed there either, and vendor bloat and compatibility issues are a major problem. Stuff actually works better on Linux these days.
Long, long ago, Linux had ndiswrapper to run Windows wifi drivers, and there's a good reason that never went anywhere long term.
Perusing it for 10 minutes, this looks really clean, almost like a Rust xv6. There's no "why" in the README (just for fun?) but maybe this would be usable as a post-C kernel teaching codebase?
Technically very impressive, but the MIT licence worries me. If something replaces Linux (not saying that something will, or that this will be it) then a non-copyleft licence spells trouble for embedded device hackers.
For more discussion, here's the Reddit thread where I saw this in the first place:
https://www.reddit.com/r/rust/comments/1r3nrju/moss_a_linuxcompatible_rust_async_kernel_3_months/
Kind of had a feeling I saw something like this before. Managed to find this project – also Linux-compatible, also written in Rust: https://lwn.net/Articles/1022920/
Not sure if it's what I was thinking of, though.