Moss: a Rust Linux-compatible kernel in 26,000 lines of code
21–30 of 163 posts
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#22Hello! 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…
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.
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.
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#23Just a hobby, won’t be big and professional like Linux?
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#24Really 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?
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.
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#25Very 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.
Why?
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#26Very 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.
Too late? https://docs.freebsd.org/en/books/handbook/linuxemu/
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#27Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#28Earlier quoted context omitted.
Why?
because otherwise big tech companies will take it and modify and release hardware with it without releasing patches etc? Basically being selfish and greedy?
Receiving a gift does not confer obligations on the recipient.
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#29Hello! 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…
Re: Moss: a Rust Linux-compatible kernel in 26,000 lines of code
#30Earlier quoted context omitted.
because otherwise big tech companies will take it and modify and release hardware with it without releasing patches etc? Basically being selfish and greedy?
It is neither selfish nor greedy to accept and use a gift freely given to you. Receiving a gift does not confer obligations on the recipient.