XunilOS is an OS made from scratch in Rust.
  • Rust 93.1%
  • Linker Script 3.4%
  • Makefile 2.5%
  • Shell 0.9%
Find a file
csd4ni3l c2a16bf8e8
All checks were successful
Build & Release XunilOS / Build x86_64 (push) Successful in 1m19s
Build & Release XunilOS / Build aarch64 (push) Successful in 1m33s
Build & Release XunilOS / release (push) Successful in 36s
Fix Actions paths
2026-06-08 18:02:27 +02:00
.forgejo/workflows Fix Actions paths 2026-06-08 18:02:27 +02:00
assets Add a proper VFS in a struct which now lives on the heap with no hacky 2026-05-31 23:41:02 +02:00
kernel Add a proper VFS in a struct which now lives on the heap with no hacky 2026-05-31 23:41:02 +02:00
user Update doomgeneric submodule to fix github action issues 2026-06-01 00:30:02 +02:00
.gitignore Patched everything for aarch64, aside from scheduler, add more linker 2026-05-16 00:30:01 +02:00
.gitmodules Update gitmodules for Forgejo 2026-06-06 16:57:46 +02:00
build_all.sh Add a proper VFS in a struct which now lives on the heap with no hacky 2026-05-31 23:41:02 +02:00
build_and_run.sh Add a proper VFS in a struct which now lives on the heap with no hacky 2026-05-31 23:41:02 +02:00
build_doomgeneric.sh Remove unused imports, merge ps2 and virtio to both use linux input 2026-05-28 18:51:03 +02:00
build_helloworld.sh Remove unused imports, merge ps2 and virtio to both use linux input 2026-05-28 18:51:03 +02:00
build_rust_app.sh Increase kernel heap size to fit more ELFs, improve scheduler by 2026-05-30 19:10:26 +02:00
config.mk Increase kernel heap size to fit more ELFs, improve scheduler by 2026-05-30 19:10:26 +02:00
GNUmakefile Increase kernel stack size to 2mb, move from cooperative to timer 2026-05-26 09:53:59 +02:00
LICENSE Initial commit 2026-03-09 19:04:38 +01:00
limine.conf Make a new layout for the OS, rebrand to XunilOS 2026-03-14 11:33:01 +01:00
README.md Turns out badapple wasn't added to the repo, also update README for 2026-06-01 00:06:57 +02:00

XunilOS

XunilOS is an OS made from scratch in Rust. The repo is based on the limine-rust-template.

It supports aarch64 inside QEMU, and x86_64 even on bare machines!

IMPORTANT

For some reason, it doesn't work with default QEMU or VirtualBox settings. So, you have to:

qemu-system-x86_64 -M q35 -serial stdio -cdrom XunilOS-x86_64.iso -m 4G

Or:

qemu-system-aarch64 -M virt,gic-version=2,secure=off -cpu cortex-a72 -device ramfb -device qemu-xhci -device usb-kbd -device usb-mouse -device virtio-keyboard-device -device virtio-mouse-device -serial stdio -cdrom XunilOS-aarch64.iso -semihosting-config enable=on,target=native -m 4G -global virtio-mmio.force-legacy=false

Features

Kernel

  • x86_64 IDT, GDT, interrupts, kernel heap, PS2 mouse/keyboard, paging, syscalls and usermode.
  • aarch64 kernel heap, paging, interrupts, Virtio mouse/keyboard, syscalls, usermode
  • Scheduler which does round-robin switching as well as sleeping and waking processes
  • ELF64 ET_EXEC and ET_DYN loading, verifying and running support
  • A readonly VFS which currently includes the ELF files which can be ran
  • IPC with granular permissions (read, write, manage)
  • basic (and insecure) SHM support
  • Limine bootloader
  • Framebuffer and serial support
  • Timing support based on IRQ
  • Per-process address space, kernel & user stack
  • Copy to and from userspace

Apps

  • doomgeneric: Doom ported to XunilOS. Isn't as easy, as i am using Rust and had to write my own libc stub.
  • badapple: Grayscale Bad Apple by using numbers to represent shades of gray. Pretty easy, but this is the only place where I also used Python.
  • shell: simple shell with elf running, echo and file read commands.
  • helloworld: just prints helloworld to serial

Init

  • Desktop-like experience
  • Window Management (close and minimize)
  • Start menu to open applications
  • BMP background
  • Mouse support with a BMP image
  • Dock where you can see currently open applications which can be minimized or unminimized

Libxunil (libc stub)

  • Basic functions of C (printf, strlen, etc)
  • File I\O, IPC, time
  • Input reading from Window Management
  • SHM
  • User Heap
  • Window management
  • IPC support
  • Syscalls to call back to the kernel
  • Primitives, Framebuffer and font rendering