Quick Summary: ๐
Moss is a Unix-like, Linux-compatible kernel written in Rust for the Aarch64 architecture. It leverages Rust's async/await features for a modern, deadlock-free kernel design and aims for binary compatibility with Linux userspace, capable of running BusyBox commands.
Key Takeaways: ๐ก
โ Moss uses Rust's
async/awaitmodel within the kernel to prevent common deadlocks by enforcing that spinlocks cannot be held across sleep points.โ It is a Unix-like kernel targeting Aarch64, providing a modern, safe foundation for ARM-based systems.
โ The project maintains binary compatibility with Linux userspace, capable of running essential tools like BusyBox commands.
โ The architecture-agnostic
libkernelallows core logic to be tested locally on host machines (e.g., x86), drastically accelerating development and debugging cycles.โ A clean Hardware Abstraction Layer (HAL) ensures modularity and simplifies potential future porting to other architectures like x86_64 or RISC-V.
Project Statistics: ๐
- โญ Stars: 1633
- ๐ด Forks: 66
- โ Open Issues: 8
Tech Stack: ๐ป
- โ Rust
Tired of wrestling with legacy kernel code and obscure memory bugs? Meet moss, a project that is fundamentally changing how we think about operating system development by leveraging the power of modern Rust and asynchronous programming. This isn't just another hobby kernel; it's a serious attempt to build a robust, Linux-compatible core from the ground up, specifically targeting the high-performance Aarch64 architecture.
The core innovation in moss lies in its deep integration of Rust's async/await model directly into the kernel context. Imagine system calls that are naturally structured as asynchronous functions. When a task needs to waitโsay, for I/O or a lockโthe code explicitly uses .await. Why is this revolutionary? Because the Rust compiler enforces a crucial safety guarantee: you cannot hold a spinlock across an await point. This single feature eliminates a massive class of kernel deadlocks that plague traditional C-based kernels, offering unparalleled stability and making concurrent programming inside the OS much safer and more intuitive.
Beyond its async core, moss is designed for compatibility and portability. It features a clean Hardware Abstraction Layer (HAL), meaning that while it currently shines on Aarch64, porting it to architectures like x86_64 or RISC-V is a structured, achievable goal. For developers, this modularity is key. The kernel also implements essential Linux syscalls, making it binary compatible enough to execute many standard Linux userspace applications, such as most BusyBox commands. This allows developers to leverage existing tools and utilities while benefiting from the safety and modernity of a Rust kernel.
Memory management is handled with strong typing, utilizing VA (Virtual), PA (Physical), and UA (User) addresses, alongside advanced features like Copy-on-Write (CoW) pages. This rigorous approach to memory ensures safety and efficiency, crucial for systems programming.
One of the most practical benefits for developers is the libkernel foundation. This utility library is designed to be architecture-agnostic, allowing core kernel logicโlike VFS abstractions, synchronization primitives, and memory managementโto be tested thoroughly on your host machine (like an x86 desktop) before ever touching bare metal or QEMU. Think about how much time this saves! Debugging complex kernel issues without the slow cycle of booting a full OS is a game-changer. moss currently boasts over 230 tests in this suite, ensuring high reliability right from the start. If youโre interested in OS development, high-performance computing on ARM, or just want to see Rust pushed to its absolute limits, moss offers a refreshing, safe, and highly testable environment.
Learn More: ๐
๐ Stay Connected with GitHub Open Source!
๐ฑ Join us on Telegram
Get daily updates on the best open-source projects
GitHub Open Source๐ฅ Follow us on Facebook
Connect with our community and never miss a discovery
GitHub Open Source
Top comments (0)