The author wrote this on reddit:<p>> What does "Rust-first" mean here? It means not only that both the (micro) kernel and the drivers are implemented in Rust, but also that Rust is the first (and only, at the moment) language that userspace programs can be written in.<p>> Although technically one can reverse-engineer the Rust-based ABI and the provided Rust toolchain to write apps for Motor OS in e.g. C, that is some work. But standard Rust programs (using standard Rust library, without FFI) will just compile and run - see e.g. <a href="https://github.com/moturus/motor-os/tree/main/src/bin/httpd">https://github.com/moturus/motor-os/tree/main/src/bin/httpd</a>.<p>> This Rust-first approach is rather unique, as e.g. Redox uses relibc and C-based kernel ABI as the glue...<p><a href="https://old.reddit.com/r/rust/comments/190znk5/mot%C5%ABrus_os_motor_os_a_rustfirst_operating_system/" rel="nofollow">https://old.reddit.com/r/rust/comments/190znk5/mot%C5%ABrus_...</a>
I'm the project author/dev. Thanks a lot for posting this, and for comments/discussions!<p>I see two main concerns raised here:<p>(a) long-term viability and support
(b) compilers, binary compatibility, etc.<p>While the first concern is definitely valid, and without a community this project will not succeed, I do believe that potential benefits of Motor OS (or a similarly focused/structured project) will eventually result in a widely used new operating system. There are major problems with Linux inside VMs (and sometimes outside), and the Linux devs are not focused on this enough to clean things up anytime soon. I work on Linux Kernel at my day job, I know.<p>Re: compiler instability, binary compatibility, etc.: I'm sorry, I don't understand what is the issue here. The latest Linux kernel can be compiled with different GCC or LLVM toolchains on x86_64, and the result will happily run old binaries compiled years ago with who knows what. repr(C) structs in rust are stable... So why so many concerns here?<p>Again, thank you all for your comments and questions - I'm happy to answer more (at least until my day job kicks in).
Out of curiousity, why would a small kernel take a whole 200ms to start on a modern computer? Wouldn't it need to initialize some metadata for the memory pages, mount the filesystem, and try to launch an init process? I suppose there might be an ethernet driver and possibly something to pipe logs to ("stdout" for the VM) to initialize. Shouldn't that all take a few microseconds?<p>Or is all the slowness in the host preparing the resources? (as in QEMU and KVM?)
One thing I keep hoping to see in all of these kernels in Rust is an async first kernel. Is there something that makes this particularly difficult or do folks not see the value in it? I know from following along with Phil Oppermann’s OS in Rust series that is definitely possible, but these last few OS’ in Rust seem to not be attempting this, <a href="https://os.phil-opp.com/async-await/" rel="nofollow">https://os.phil-opp.com/async-await/</a>
Sounds interesting, but it also reminds me of what Linus once said when asked about fearing competition.
From my memory his answer was something like: I really like writing device drivers. Few people like that and until someone young and hungry comes along who likes that I'm not afraid of competition.
It sounds like a cool project and I hope it continues development, but there is such a huge graveyard of such projects that have never gone anywhere that I struggle to get excited about them anymore. Replacing Linux is really hard, even for specific uses like cloud.
I was skeptical at first- the healthy approach to any new tech. But thinking again, the efficiency and security gains from stripping away layers of cruft after rather compelling
> Docker, Nix OS, "serverless", etc. all exist because of Linux's complexity<p>Docker and NixOS exist because of userspace problems with package management and serverless exists because businesses want to pay for compute on demand.
> ...Docker, Nix OS, "serverless", etc. all exist because of Linux's complexity<p>Yeah, this seems like it's more directly competing with those than Linux. I'd want to see those addressed in the "Why?" -- that is, why MotorOs instead of Docker, etc.?
> a simple multi-processor round robin (SMP)<p>> the kernel is very small and does not block, so does not need to be preemptible<p>I don't believe you and I don't even need to look at the code to know this is false.
It could be cool if there was a WASM container built in Rust that could run in this OS. I don't really have a sense of how complicated a WASM container is, though it seems non-trivial to even decide <i>what</i> such a thing is, so it would be nice not to treat the WASM container itself as the OS (i.e., more room to safely experiment). WASM also seems like it dodges the ABI issue by being more explicitly about composition instead of shared binary data structures.
> Nix OS all exist because of Linux's complexity<p>That said, I would be thrilled to build this and other alt OSes and their userlands with Nix / Nixpkgs :).