frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://github.com/hexagonal-sun/moss
76•hexagonal-sun•6d ago

Comments

hexagonal-sun•6d ago
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!

bramadityaw•58m ago
shouldn't this be a ShowHN?
Rochus•38m ago
Cool project, congrats. I like the idea with libkernel which makes debugging easier before going to "hardware". It's like the advantages of a microkernel achievable in a monolithic kernel, without the huge size of LKL, UML or rump kernels. Isn't Rust async/awat depending on runtime and OS features? Using it in the kernel sounds like an complex bootstrap challenge.
kaoD•27m ago
Rust's async-await is executor-agnostic and runs entirely in userspace. It is just syntax-sugar for Futures as state machines, where "await points" are your states.

An executor (I think this is what you meant by runtime) is nothing special and doesn't need to be tied to OS features at all. You can poll and run futures in a single thread. It's just something that holds and runs futures to completion.

Not very different from an OS scheduler, except it is cooperative instead of preemptive. It's a drop in the ocean of kernel complexities.

rcxdude•20m ago
Yeah, for example embassy-rs is an RTOS that uses rust async on tiny microcontrollers. You can hook task execution up to a main loop and interrupts pretty easily. (And RTIC is another, more radically simple version which also uses async but just runs everything in interrupt handlers and uses the interrupt priority and nesting capability of most micros to do the scheduling)
Rochus•1m ago
Ok, I see. I spent a lot of time with .Net VMs, where you cannot simply separate await from the heavy machinery that runs it. I now understand that in a kernel context, you don't need a complex runtime like Tokio. But you still need a way to wake the executor up when hardware does something (like a disk interrupt); but this indeed is not a runtime dependency.
IshKebab•21m ago
Impressive work! Do you have any goals, other than learning and having fun?

Also how does it's design compare with Redox and Asterinas?

maxloh•19m ago
In what extent is this compatible with Linux?

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

tuyiown•8m ago
While it's very legitimate question, the answer is between the lines in the README, and it mostly means that there is a user space binary compatibility for everything that is implemented.

It might seem obscure, but syscalls to get access to kernel requires a tight integration on compilation and linking. So this is their approach and this is where the compatibility really means something : since you can cross compile on another machine, they don't need the full toolchain right away. Just compile your code on a linux machine, and run it there. You're at the mercy of all missing kernel API implementations, but it looks like a very good strategy if you aim is to code a kernel, as you only have to focus on actual syscalls implementation without getting distracted by toolchain.

marty-oehme•6m ago
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 HN: Glasses to detect smart-glasses that have cameras

https://github.com/NullPxl/banrays
215•nullpxl•5h ago•71 comments

Pocketbase – open-source realtime back end in 1 file

https://pocketbase.io/
300•modinfo•7h ago•106 comments

EU Council Approves New "Chat Control" Mandate Pushing Mass Surveillance

https://reclaimthenet.org/eu-council-approves-new-chat-control-mandate-pushing-mass-surveillance
79•fragebogen•43m ago•24 comments

A Repository with 44 Years of Unix Evolution

https://www.spinellis.gr/pubs/conf/2015-MSR-Unix-History/html/Spi15c.html
11•lioeters•1h ago•1 comments

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

https://github.com/hexagonal-sun/moss
77•hexagonal-sun•6d ago•10 comments

How to make precise sheet metal parts (photochemical machining) [video]

https://www.youtube.com/watch?v=bR9EN3kUlfg
23•surprisetalk•5d ago•2 comments

How Charles M Schulz created Charlie Brown and Snoopy (2024)

https://www.bbc.com/culture/article/20241205-how-charles-m-schulz-created-charlie-brown-and-snoopy
138•1659447091•11h ago•60 comments

Same-day upstream Linux support for Snapdragon 8 Elite Gen 5

https://www.qualcomm.com/developer/blog/2025/10/same-day-snapdragon-8-elite-gen-5-upstream-linux-...
419•mfilion•19h ago•199 comments

Vsora Jotunn-8 5nm European inference chip

https://vsora.com/products/jotunn-8/
122•rdg42•11h ago•37 comments

Beads – A memory upgrade for your coding agent

https://github.com/steveyegge/beads
42•latchkey•6h ago•14 comments

How to use Linux vsock for fast VM communication

https://popovicu.com/posts/how-to-use-linux-vsock-for-fast-vm-communication/
31•mfrw•6h ago•7 comments

Tech Titans Amass Multimillion-Dollar War Chests to Fight AI Regulation

https://www.wsj.com/tech/ai/tech-titans-amass-multimillion-dollar-war-chests-to-fight-ai-regulati...
26•thm•1h ago•27 comments

Implementing Bluetooth LE Audio and Auracast on Linux Systems

https://www.collabora.com/news-and-blog/blog/2025/11/24/implementing-bluetooth-le-audio-and-aurac...
68•losgehts•3d ago•3 comments

250MWh 'Sand Battery' to start construction in Finland

https://www.energy-storage.news/250mwh-sand-battery-to-start-construction-in-finland-for-both-hea...
274•doener•12h ago•188 comments

GitLab discovers widespread NPM supply chain attack

https://about.gitlab.com/blog/gitlab-discovers-widespread-npm-supply-chain-attack/
209•OuterVale•19h ago•119 comments

A programmer-friendly I/O abstraction over io_uring and kqueue (2022)

https://tigerbeetle.com/blog/2022-11-23-a-friendly-abstraction-over-iouring-and-kqueue/
85•enz•12h ago•26 comments

Physicists drive antihydrogen breakthrough at CERN

https://phys.org/news/2025-11-physicists-antihydrogen-breakthrough-cern-technique.html
191•naves•5d ago•67 comments

Quake Engine Indicators

https://fabiensanglard.net/quake_indicators/index.html
265•liquid_x•4d ago•54 comments

Open (Apache 2.0) TTS model for streaming conversational audio in realtime

https://github.com/nari-labs/dia2
3•SweetSoftPillow•3d ago•0 comments

Migrating to Positron, a next-generation data science IDE for Python and R

https://posit.co/blog/positron-migration-guides
35•ionychal•7h ago•28 comments

Maxduino Review: Tape Cassette Emulator for Multiple Retro Computers

https://retrogamecoders.com/maxduino-review/
45•ibobev•3d ago•1 comments

Feedback doesn't scale

https://another.rodeo/feedback/
176•ohjeez•1d ago•67 comments

Memories of .us

https://computer.rip/2025-11-11-dot-us.html
168•sabas_ge•1d ago•57 comments

Shor's algorithm: the one quantum algo that ends RSA/ECC tomorrow

https://blog.ellipticc.com/posts/what-is-shors-algorithm-and-why-its-the-single-biggest-threat-to...
19•iliasabs•8h ago•5 comments

Comparing xeus-Haskell and ihaskell kernels

https://www.datahaskell.org/blog/2025/11/25/a-tale-of-two-kernels.html
10•mchav•2d ago•5 comments

Indie, alone, and figuring it out

https://danijelavrzan.com/posts/2025/11/indie-dev/
79•wallflower•4d ago•24 comments

Designing a Mechanical Calculator

https://signoregalilei.com/2025/11/22/designing-a-mechanical-calculator/
23•surprisetalk•4d ago•8 comments

Tell HN: Happy Thanksgiving

725•prodigycorp•1d ago•179 comments

Experimenting with Robin Hood Hashing

https://twdev.blog/2025/11/robin_hood/
19•signa11•5d ago•5 comments

TPUs vs. GPUs and why Google is positioned to win AI race in the long term

https://www.uncoveralpha.com/p/the-chip-made-for-the-ai-inference
370•vegasbrianc•21h ago•276 comments