DEV Community

Crackanimador
Crackanimador

Posted on

Building MesaOS: A 64-bit Hybrid Kernel written in Rust from Scratch

Hi everyone! I am a student from Spain who is working on MesaOS, a open source operating system that is 64‑bit and hybrid. MesaOS is written from the beginning in Rust for the x86_64 architecture.

My aim with this project is to learn about low‑level systems programming, how an operating system is built and how drivers can work together.

Key Architectural Features:

  • Linux Driver Shim: The system implements than 400 exported kernel symbols such as kmalloc, printk, pci_* and dma_* so that Linux drivers can be loaded.

  • Networking Stack: The project has a custom network stack that supports Ethernet, ARP, IPv4 ICMP and allows header parsing for UDP and TCP. It also includes DHCP and DNS support.

  • Audio & Storage: The OS streams high‑definition audio in time using WAV files in 512‑kilobyte chunks. It also has a model for injecting an initrd.

  • Interactive Shell: The shell contains more than 80 built‑in commands. It can run user‑space ELF binaries at Ring 3. It manages processes.

Tech Stack & Tools:

  • Language & Bootloader: The code is written in Rust (Nightly). Uses Limine as the bootloader for both UEFI and BIOS.

  • Tested Hardware: The operating system runs correctly in QEMU and on hardware on an HP 15s laptop.

AI‑Assisted Workflow: I design the architecture write the specifications fix kernel panics and test the hardware on a machine. I use language models as an active tool for generating code during development.

I am currently looking for contributors who're interested in driver development for xHCI/USB and Wi‑Fi in building TCP state machines and, in designing the kernel.

GitHub: MesaOS

Discord: Mesa OS Discord

Top comments (0)