cykusz-rs icon indicating copy to clipboard operation
cykusz-rs copied to clipboard

Toy operating system written in Rust

CI CI

cykusz-rs

Intro

cykusz-rs is a toy operating system written in Rust programming language.

https://github.com/rafalmiel/cykusz-rs/assets/3881998/afa514a1-f435-4eeb-8c80-200129e6900d.mov

Kernel

  • [x] 64bit higher-half kernel
  • [x] VESA fb output
  • [x] Physical memory allocator
  • [x] Paging
  • [x] Kernel heap
  • [x] Interrupt handlers
  • [x] ACPI support (ioapic, lapic, acpica)
  • [x] SMP
  • [x] Per-CPU-Storage using thread_local
  • [x] Preemptive per-cpu scheduler
  • [x] PS2/Keyboard driver
  • [x] Tty with ansi escape codes
  • [x] Virtual File System
  • [x] Page/Inode/Directory cache
  • [x] Memory mapped files (mmap interface)
  • [x] Pipes
  • [x] Storage (ide, ahci)
  • [x] Filesystem (ext2)
  • [x] Network Stack (e1000, ETH, ARP, IP, UDP, TCP, ICMP, DHCP, DNS)

Userspace

  • [x] Bash shell
  • [x] libc (mlibc port)
  • [x] Exec/fork
  • [x] Threads
  • [x] Thread local storage
  • [x] Fs mount/umount
  • [x] Posix signals
  • [x] Futexes
  • [x] Shared libs

Ports

Libs

Apps

Building OS

You will need following packages to compile and run the os:

  • rust (rustup)
  • nasm
  • qemu
  • grub2
  • parted
  • docker (for userspace docker build)

Building:

git clone https://github.com/rafalmiel/cykusz-rs.git
git submodule update --init --recursive

rustup override set nightly
rustup component add rust-src
make

./disk-scripts/create_disk.sh

Building Userspace

It is recommended to use docker for building userspace for stable environment.

Using docker

./sysroot/make_docker_image.sh
./sysroot/toolchain_docker.sh

Using host

./sysroot/toolchain.sh

Running

qemu

make run

bochs

make bochs

VirtualBox

# Run only once to import the image into VirtualBox
./create_vbox_image.sh

make vbox