logoalt Hacker News

Moss: a Rust Linux-compatible kernel in 26,000 lines of code

346 pointsby hexagonal-sunlast Saturday at 7:11 AM105 commentsview on HN

Comments

leo_etoday at 4:41 PM

The choice of MIT for a kernel feels like setting up the project to be cannibalized rather than contributed to.

We've seen this movie before with the BSDs. Hardware vendors love permissive licenses because they can fork, add their proprietary HAL/drivers, and ship a closed binary blob without ever upstreaming a single fix.

Linux won specifically because the GPL forced the "greedy" actors to collaborate. In the embedded space, an MIT kernel is just free R&D for a vendor who will lock the bootloader anyway.

show 6 replies
hexagonal-sunlast Saturday at 7:11 AM

Hello!

For the past 8 months, or so, I've been working on a project to create a Linux-compatible kernel in nothing but Rust and assembly. I finally feel as though I have enough written that I'd like to share it with the community!

I'm currently targeting the ARM64 arch, as that's what I know best. It runs on qemu as well as various dev boards that I've got lying around (pi4, jetson nano, AMD Kria, imx8, etc). It has enough implemented to run most BusyBox commands on the console.

Major things that are missing at the moment: decent FS driver (only fat32 RO at the moment), and no networking support.

More info is on the github readme.

https://github.com/hexagonal-sun/moss

Comments & contributions welcome!

show 3 replies
marty-oehmetoday at 11:13 AM

Very cool project! I do have to admit - looking far, far into the future - I am a bit scared of a Linux ABI-compatible kernel with an MIT license.

show 5 replies
meiseltoday at 11:25 AM

Really neat. Do you have any specific long term goals for it? Eg, provide an OS distro (using Linux drivers?) to provide memory safety for security-critical contexts?

Also, are there any opportunities to make this kernel significantly faster than Linux’s?

show 1 reply
gslepaktoday at 3:51 PM

How does this compare to https://github.com/nuta/kerla ?

show 1 reply
nikanjtoday at 12:18 PM

Just a hobby, won’t be big and professional like Linux?

show 2 replies
cedwstoday at 1:52 PM

I don't know much about Linux internals - how difficult would it be to reimplement KVM? I'm guessing a big undertaking.

erichoceantoday at 3:46 PM

This plus using Fil-C for the BusyBox commands is a nice combination (once Fil-C supports ARM64).

show 1 reply
maxlohtoday at 11:00 AM

In what extent is this compatible with Linux?

Could I swap Ubuntu's or Android's kernel with this, while keeping those OSes bootable?

show 1 reply
theoldgreybeardtoday at 5:24 PM

> MIT license

What have you done?!

tony-john12today at 12:58 PM

[dead]

randyfoxtoday at 5:15 PM

[flagged]

show 4 replies