ManaOS is a monolithic x86_64 UEFI kernel developed in Rust, designed with a focus on scalability and contributor friendliness—truly an "OS for Developers."
- HAL Architecture: Strict separation between hardware-specific and generic kernel logic.
- Callback-Based Interrupt Wiring:
arch/handles hardware interrupts without directly depending onkernel/. - Boot/Runtime Split:
main.rswires the system together while boot and runtime modules own focused initialization and tick processing. - Developer-First API Direction: Ergonomic APIs with Rust-style naming,
such as future drawing helpers like
graphics.draw_text. - Global Collaboration: English-first documentation and standard PR-based workflow.
- Modern Tooling: Seamless build and run experience with
justandqemu.
- Rust with the pinned nightly in
rust-toolchain.toml - QEMU
OVMF.fd(Place it in the root directory)justfor the documented build, run, lint, and smoke-test commands
If you have just installed:
justAlternatively, use the provided scripts:
- Windows:
run.bat - Linux/macOS:
./run.sh
ManaOS is organized around a small set of engineering topics. Use these topics to decide which document to read before changing code:
- Architecture Boundaries:
main.rsis the composition root,arch/owns hardware-specific entry points, andkernel/owns platform-independent policy. - Interrupts And Timers: hardware interrupt handlers stay minimal, dispatch through registered callbacks, and acknowledge the active interrupt-controller backend.
- Memory Ownership: physical frames, user address spaces, kernel virtual mappings, DMA buffers, and guarded stacks each have explicit owner rules.
- User Processes: ELF loading, user stacks, syscall entry, trap frames,
preemption, process metadata, and future
execve/waitpidwork are tracked as one lifecycle. - Storage And Filesystems: AHCI, GPT, FAT32, VFS, path normalization, file descriptors, and future write support are treated as separate layers.
- Developer Workflow: contributors use pull requests; maintainers may use the direct branch workflow only after local verification, and local pre-merge checks are collected in one command.
The repository is intentionally split by ownership boundary:
| Path | Purpose |
|---|---|
src/main.rs |
Composition root. Wires boot data, architecture providers, kernel services, drivers, and smoke lifecycle. |
src/arch/ |
Architecture-specific CPU, interrupt, APIC/PIC, syscall, context switch, and MMIO code. Must not depend on kernel/. |
src/kernel/ |
Platform-independent kernel policy: memory, task scheduling, syscalls, filesystems, drivers, diagnostics, and console services. |
src/shared/ |
ABI contracts and small shared layouts used across kernel and userland-facing boundaries. |
userland/ |
no-std userland runtime and demo programs built for x86_64-unknown-none. |
docs/ |
English design documents and validation guides. |
docs/ja/ |
Japanese companion documents for discussion and onboarding. |
scripts/ |
Host-side PowerShell tooling for disk images, smoke runs, license generation, and boundary checks. |
templates/ |
Copy-start templates for modules, drivers, design docs, and commit messages. |
esp/ |
UEFI system partition assets copied into the QEMU boot image. |
Before changing a subsystem, read the nearest design document and the module's
mod.rs ownership comment. If an edit crosses a boundary, update the
documentation in the same branch.
| Change area | Start here |
|---|---|
| New agent or automated change | AGENTS.md, then CONTRIBUTING.md |
| Architecture, interrupt, or syscall entry work | docs/ARCHITECTURE.md, docs/USER_TRAP_FRAME.md |
Process lifecycle, execve, waitpid, or user image replacement |
docs/PROCESS_LIFECYCLE.md, docs/USER_POINTER_VALIDATION.md, docs/USER_TRAP_FRAME.md |
| ACPI, APIC, IOAPIC, PIC, or timer work | docs/ACPI.md, docs/ARCHITECTURE.md |
| Memory, paging, stacks, or address ownership | docs/MEMORY_MANAGEMENT.md, docs/ADDRESS_BOUNDARIES.md, docs/KERNEL_STACKS.md |
| Syscall pointer validation | docs/USER_POINTER_VALIDATION.md, docs/USER_TRAP_FRAME.md |
| Storage, FAT32, VFS, or console file commands | docs/FILESYSTEM.md, docs/MANUAL_QEMU_VALIDATION.md |
Local setup, just verify, script troubleshooting, or disk.img maintenance |
docs/DEVELOPMENT.md |
| Choosing the next task | TODO.md, docs/TASK_PRIORITY.md |
English documents are the source of truth. Japanese companion documents are kept for smoother discussion and onboarding.
Use the narrowest useful command first, then expand when a change crosses a kernel boundary:
just verify
just fmt
cargo check
cargo check --target x86_64-unknown-uefi
just lint
just storage-smoke- Use
just verifyas the local pre-merge gate for formatting, clippy, architecture boundaries, and kernel/userland builds. - Use
git diff --checkorgit show --checkfor documentation-only changes. - Use
just lintwhen architecture, kernel/userland, or syscall boundaries are touched. - Use
just storage-smokefor boot-visible changes, storage/filesystem work, scheduler changes, memory ownership changes, syscall behavior, or userland runtime behavior.
When a check is skipped, record the reason in the commit or handoff notes. A successful compile is necessary, but not sufficient, for unsafe, interrupt, memory, scheduler, or syscall changes.
We welcome contributors from all over the world! Please check our CONTRIBUTING.md for guidelines on coding standards, language policy, design principles, and our roadmap.
For architecture and module ownership details, see docs/ARCHITECTURE.md. For the current roadmap and known refactoring tasks, see TODO.md. For Japanese documentation, start at docs/ja/README.ja.md.
日本語のドキュメントは docs/ja/README.ja.md に用意されています。
See the LICENSE file for the current project license.
Built with ❤️ for the developer community.