Crate mycelium_kernel
source ·Expand description
mycelium
someday this will do stuff
what is it?
this repository contains Mycelium, an alleged “operating system”, and a collection of Rust libraries written as part of its development. eventually, Mycelium will be a microkernel-ish operating system that runs on commodity desktop hardware, executes WebAssembly modules in both kernel- and user-space, and implements the WebAssembly System Interface (or WASI) as its syscall layer.
right now, though, it runs…one webassembly module, which prints “hello world” and immediately exits. so that’s coming along great, thanks for asking.
crates
“what if the real operating system was the libraries we wrote along the way?”
in the process of implementing Mycelium itself, we’ve written a whole bunch of Rust libraries, which also live in this repository. some of these libraries may be generally useful for other projects, and have been or will be published to crates.io.
the general-purpose crates in this repository include:
cordyceps
: a library of intrusive data structures, including linked lists and lock-free MPSC queues,maitake
: an “async runtime construction kit” for using Rust’s async/await in bare metal applications such as operating systems,mycelium-alloc
: an implementation of a buddy-block memory allocator,mycelium-bitfield
: a bitfield library based on const eval and declarative macros,mycelium-util
: a “standard library” of reusable components for bare-metalno_std
Rust projects, such asno_std
synchronization primitives.
in addition, beyond the kernel itself, this repository also contains the following Mycelium components:
hal-core
: the core interface definitions of Mycelium’s (admittedly somewhat half-baked) hardware abstraction layer,hal-x86_64
: implementations of the Mycelium HAL for 64-bit x86 (amd64) CPUs,mycotest
: testing utilities for Mycelium’s in-kernel tests,inoculate
: Mycelium’s Horrible Build Tool™
how do i run it?
so…how do i actually build and run Mycelium?
the easiest way to run the Mycelium kernel (using the QEMU emulator) is to use
inoculate
, Mycelium’s Horrible Build Tool™. to launch Mycelium in QEMU, run
cargo run-x64
see CONTRIBUTING.md for details on development environment setup and tools.
Modules
- Cross-platform drivers.
- A rudimentary kernel-mode command shell, primarily for debugging and testing purposes.