Skip to content

DanielCoder834/clarOs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Char OS

A minimal educational operating system written in Rust, built by following and adapting Philipp Oppermann’s Writing an OS in Rust tutorial series.

This project focuses on learning core operating system concepts while leveraging Rust’s safety guarantees. It is intentionally small, readable, and experimental.


🧠 Overview

This OS is a freestanding Rust kernel that boots on x86_64 hardware (or an emulator like QEMU). It incrementally introduces low-level systems concepts such as booting, memory management, interrupts, and basic multitasking, closely mirroring the structure and progression of the tutorial at os.phil-opp.com.


✨ Features

  • Written in Rust (no_std)
  • Bootable x86_64 kernel
  • VGA text-mode output
  • Keyboard and timer interrupts
  • Paging and basic memory management
  • Heap allocation support
  • Kernel testing support
  • Introductory async / task system

📂 Project Structure

char-os/
├── Cargo.toml
├── Cargo.lock
├── x86_64-blog_os.json # Custom compilation target
├── src/
│ ├── main.rs # Kernel entry point
│ ├── lib.rs # Shared kernel functionality
│ ├── vga_buffer.rs # VGA text output
│ ├── serial.rs # Serial port logging
│ ├── interrupts.rs # IDT and interrupt handlers
│ ├── gdt.rs # Global Descriptor Table
│ ├── memory.rs # Paging and frame allocation
│ ├── allocator.rs # Heap allocator
│ └── task/ # Async task system
│ ├── mod.rs
│ ├── executor.rs
│ ├── simple_executor.rs
│ └── keyboard.rs
├── tests/ # Kernel integration tests
│ ├── basic_boot.rs
│ ├── heap_allocation.rs
│ ├── should_panic.rs
│ └── stack_overflow.rs

⚙️ Requirements

  • Rust nightly toolchain
  • cargo
  • QEMU (recommended)

▶️ Building & Running

Run the OS:

cargo run

You should see the kernel boot.


Learning Goals

This project is designed to teach:

  • How an OS boots without an underlying operating system
  • Writing bare-metal Rust with no_std
  • Interrupt handling and hardware interaction
  • Memory paging and heap allocation
  • Structuring a small but real OS kernel

📚 Inspiration & References


⚠️ Disclaimer

  1. This operating system is for educational purposes only. It is not production-ready, secure, or complete.
  2. I am not actively maintaing this repository. Any breaking changes to Rust Nightly or any third-party library will likely go unnoticed.
  3. The OS is targetting x86_64 so I would recommend you check to make sure it is compatiable prior to running this OS.

I hope you like the project! 🦀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages