An open-source non-Unix-like OS, written from scratch in Rust for fun.
- SafaOS: the main repo, also contains the kernel implementition.
- safa-api: an API over the SafaOS kernel, also contains documenation.
- salibc: a libc implementition over the
safa-api. - rust: rust port (currently only the rust standard library is ported which internally uses the
safa-api).
I am trying my best to stay as unique as possible in the hobby OS space, altough SafaOS is currently not that interesting here is what i tried too far:
-
not unix or NT like
-
multi-architecture: SafaOS is a multi-architecture OS unlike most hobby OSes, supporting both
x86_64andaarch64 -
100% written in rust: You can see the libc is written in Zig but it is more of a side project, and it isn't used anywhere in the final OS Image for now, if it will ever be, I'll rewrite it in rust, I relay on the safa-api and rust's standard library for writing userspace applications for now.
-
rust first design: It isn't unix-like and therefore allows for a more rust-like design, for example syscall arguments don't relay on null termination and expect a length, pointer arguments has references' requirements, also the rust standard library doesn't relay on a libc internally but rather the
safa-apiwhich is written in 100% rust.
See a more detailed overview of features here.
- AArch64: Only tested
qemu-virtbut it should work on any machine with: GICV3, a GICITS, a generic timer, PCIe(optional), and UEFI - x86_64: tested on both real hardware and qemu
- XHCI
- USB HID Keyboard
- PS/2 Keyboard (x86_64 only)
- labeled VFS which includes these filesystems
proc:/: similar to unix's/proc, contains read-only data of mostly json that the kernel provides for example:cpuinfo,meminfo,kernelinfo,usbinfo,eve-journal, and process related information[PID]/infodev:/: similar to unix's/dev, contains a read-write interface over some of the system drivers such as the TTYdev:/tty, altough i have plans to revmap or remove bothprocanddevsys:/: contains system files, and global binaries insys:/binram:/: a playground ramdisk
- more architecture specific drivers, such as the
ACPIand theAPICfor x86_64, and theGICfor aarch64




