/cykusz-rs

Toy operating system written in Rust

Primary LanguageRustGNU General Public License v3.0GPL-3.0

CI CI

cykusz-rs

Intro

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

cykusz-screen0.webm

Kernel

Core features

  • x86_64 monolithic kernel
  • 4-level paging
  • Preemptive per-cpu scheduler
  • ACPI (ioapic, lapic, acpica)
  • VM (elf loader, shared memory, COW)
  • Filesystem (ext2)
  • Page / Inode / Directory cache
  • TTY with ansi escape codes
  • Network Stack (e1000, ETH, ARP, IP, UDP, TCP, ICMP, DHCP, DNS)
  • IPC: Pipes / Unix Sockets / SHM

Drivers

  • VESA framebuffer
  • PS/2: Keyboard / Mouse
  • Storage: IDE / AHCI
  • Networking: e1000

Userspace

  • libc (mlibc port)
  • Exec / fork
  • Threads
  • Thread local storage
  • Fs mount/umount
  • Posix signals
  • Futexes
  • 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