ToubkalOS is a from-scratch, no_std, cross-platform operating system written in Rust. It aims to be a robust, secure, and fully documented micro-kernel-like environment.
ToubkalOS now features a premium, zero-latency desktop environment (xtoubkal) with:
- Glassmorphism: Elegant software-rendered transparency effects for window frames.
- Dynamic Z-Order: Interactive window management with "Focus-on-Click" behavior.
- Vibrant Aesthetics: Vertical linear gradients and active-window highlighting for a premium look.
- System Clock: Real-time multitasking performance tracking in the taskbar.
- Multi-Architecture: Native support for AArch64 (ARMv8) and x86_64.
- Cooperative Scheduler: Lightweight task management using architecture-specific context switching.
- VirtIO Mastery: High-performance drivers for Cloud & QEMU environments.
virtio-blk: Persistent FAT32 storage with sector-spanning safety.virtio-net: Full smoltcp stack (DHCP/TCP/UDP) with calibrated NIC descriptors.virtio-gpu: Custom software-rendered graphics with zero-latency buffering.virtio-tablet: Absolute coordinate tracking for fluid mouse movement.
- Interactive Shell: Custom prompt with history (
readline), tab compilation, and thebimtext editor.
ToubkalOS is an ambitious project aiming to push the boundaries of hobbyist kernel design. We are actively looking for contributors in:
- Porting to real hardware (Raspberry Pi 4/5, Pine64).
- Enhancing the GUI with bitmap font support and icon assets.
- Implementing preemption and SMP (Symmetric Multi-Processing).
Feel free to open a Pull Request or join the discussion in the Issues tab!
To build and run ToubkalOS, ensure the following are installed:
- Rust Nightly:
rustup default nightly - LLVM Toolchain:
clangandllvm-ar - QEMU:
qemu-system-aarch64andqemu-system-x86_64 - Make: For orchestrating the build using the provided
Makefile
The easiest way to experience ToubkalOS is via QEMU. The Makefile dynamically detects your host platform and builds the appropriate targets without hardcoded paths.
# Format & Check
make fmt
make check
# AArch64 (Default)
make build
make run # Serial console mode
make run-gui # Graphical mode
# x86_64
make build-x86
make run-x86 # Serial console modeThis will automatically create a blank 64 MB FAT32 disk image (drive.img) on first boot if it doesn't exist.
ToubkalOS is dual-licensed to ensure maximum flexibility and community adoption. You may choose one of the following:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)