BarbaOS is a small toy operating system written in Rust (no_std, no_main),
rewritten from scratch based on a previous attempt. You can find the first
attempt at legacy branch.
legacy branch was hand-written, full of comprehensive notes. It was curated
so every commit had a specific functionality addition. Now BarbaOS v0.2
development is AI-assisted. It doesn't mean it's vibe coded, but AI is and will
be used in the development of this toy project.
Unlike previous version, this version targets two architectures:
- RISC-V (64-bit,
riscv64gc-unknown-none-elf) - the default cargo target. - x86 32-bit (i686) - via a custom target specification.
- A nightly Rust toolchain. Building the kernel relies on unstable
features (inline assembly,
-Z build-std).rustup toolchain install nightly rustup override set nightly - The
rust-srccomponent, required by-Z build-stdto rebuildcore/allocfor the custom i686 target.rustup component add rust-src - QEMU to run the kernel:
qemu-system-riscv64for the RISC-V target.qemu-system-i386for the x86 target.
Since RISC-V is the default target you can build with:
cargo build
and run with:
cargo run
For i686, build with the custom target configuration:
cargo build -Z build-std=core,alloc --target i686-unknown-none.json
and execute with:
cargo run -Z build-std=core,alloc --target i686-unknown-none.json
This project is licensed under the MIT License.