Skip to content
@SafaOS

SafaOS

License Org's Stars

An open-source non-Unix-like OS, written from scratch in Rust for fun.

Screenshots

Screenshots

aarch64

real-hardware

x86_64

running lua

running tests

See also

  • 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).

Overview

What makes SafaOS a unique (hobby OS)?

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_64 and aarch64

  • 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-api which is written in 100% rust.

Features

See a more detailed overview of features here.

Architectures

  • AArch64: Only tested qemu-virt but 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

Drivers

  • 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]/info
    • dev:/: similar to unix's /dev, contains a read-write interface over some of the system drivers such as the TTY dev:/tty, altough i have plans to revmap or remove both proc and dev
    • sys:/: contains system files, and global binaries in sys:/bin
    • ram:/: a playground ramdisk
  • more architecture specific drivers, such as the ACPI and the APIC for x86_64, and the GIC for aarch64

Pinned Loading

  1. SafaOS SafaOS Public

    an opensource operating system made for fun

    Rust 163 4

  2. libc libc Public

    a libc written in Zig for the SafaOS operating-system.

    Zig 9

  3. safa-api safa-api Public

    Rust 2

Repositories

Showing 10 of 10 repositories

Top languages

Loading…

Most used topics

Loading…