HackerTrans
TopNewTrendsCommentsPastAskShowJobs

hexagonal-sun

no profile record

Submissions

Moss: A Linux-compatible Rust async kernel, 3 months on

4 points·by hexagonal-sun·قبل 5 أشهر·2 comments

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

github.com
437 points·by hexagonal-sun·قبل 8 أشهر·156 comments

Trale (Tiny Rust Async Linux Executor) v0.3. For Rust Released

github.com
1 points·by hexagonal-sun·السنة الماضية·1 comments

comments

hexagonal-sun
·قبل 5 أشهر·discuss
Indeed! There are a few parts where I resorted to AI (mainly for the unit tests in libkernel), but I made sure to read through the generated code and that the tests were sane.
hexagonal-sun
·قبل 8 أشهر·discuss
Yip, I panic whenever I encounter a syscall that I can't handle and that prompts me to implement it.

Yeah, I was thinking of integrating that at some point. They've done a really nice job of keeping it no_std-friendly.
hexagonal-sun
·قبل 8 أشهر·discuss
Eventually, It'd be amazing to use Moss as my daily driver OS. That means targeting the specific hardware that I have, but in doing so, I hope to build up enough of the abstractions to allow easier porting of hardware.

A more concrete mid-term goal is for it to be 'self-hosting'. By that I mean you could edit the code, download dependencies and compile the kernel from within Moss.
hexagonal-sun
·قبل 8 أشهر·discuss
;-)
hexagonal-sun
·قبل 8 أشهر·discuss
This has been a real help! The ability to easily verify the behavior of certain pieces of code (especially mem management code) must have saved me hours of debugging.

Regarding the async code, sibling posts have addressed this. However, if you want to get a taste of how this is implemented in Moss look at src/sched/waker.rs, src/sched/mod.rs, src/sched/uspc_ret.rs. These files cover the majority of the executor implementation.
hexagonal-sun
·قبل 8 أشهر·discuss
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!
hexagonal-sun
·السنة الماضية·discuss
Hello!

I've just released trale v0.3.0 — my attempt at building a small, simple, but fully-featured async runtime for Rust.

Trale is Linux-only by design to keep abstraction levels low. It uses io_uring for I/O, and provides futures for both sockets and file operations.

The big feature in this release is multishot I/O, implemented via async streams. Right now, only TcpListener supports it — letting you accept multiple incoming connections with a single I/O submission to the kernel.

You can find it on GitHub: https://github.com/hexagonal-sun/trale And on crates.io: https://crates.io/crates/trale

Would love to hear your thoughts or feedback!