A UNIX-like Rust OS built for RISC-V, available on the web.
Features include:
- COW fork, mmap, and kernel threads.
- Async kernel executor that handles UART/disk/network I/O cooperatively without blocking CPUs in addition to the preemptive user scheduler.
- APLIC/MSI interrupts for per-hart message-signaled delivery, replacing PLIC.
- Signals with interval timers, job control, and poll/select.
- IPC including shared memory and AF_UNIX sockets.
- Journaling filesystem with fsync, crash recovery, symlinks, and permissions.
- TCP/UDP networking over virtio-net.
- Framebuffer with UTF-8/ANSI support and keyboard/mouse input.
- Web UI that streams the framebuffer via VNC over WebRTC.
Try out some commands:
sleep 30 &
jobs
fg %1
touch /tmp/a && ln -s /tmp/a /tmp/a.sym && ls /tmp
kv "p,1,hello" "p,2,world" "a"
kv "g,1"
wserver &
jobs
kill <pid>
test_fsync --journalCreate an Open Relay TURN server account here for TURN server credentials.
npm i
prek install
fly auth logincargo run --target riscv64gc-unknown-none-elf # run kernel
mprocs # run server and frontend
prek run --all-files # run hooks
act push --bind # test CI
docker build -t web-os . # test kernel build
docker run --rm -p 8080:8080 web-os # test kernel run
fly ips allocate-v4 # allocate a dedicated IPv4 for WebRTC
fly secrets set ICE_PUBLIC_IPS=<dedicated-ipv4>
fly secrets set TURN_USERNAME=<username> TURN_CREDENTIAL=<credential>
fly redis create
fly secrets set UPSTASH_REDIS_REST_URL=<url> UPSTASH_REDIS_REST_TOKEN=<token>
fly deploy- dual stream for pipes (kernel-space)
- COW mappings
- mmap
- IPC: shared memory
- kernel threads
- proc control: signals + waitpid opts + interval timers
- tty/job control: pgrp + sessions + controlling TTY + fg/bg
- adv I/O: nonblock + poll/select
- fcntl: F_GETFL/F_SETFL + FD_CLOEXEC
- file locks: fcntl F_SETLK/F_GETLK
- raw block device file: user fsck reads disk
- fs names/attrs: rename + symlinks + permissions + umask
- fs durability: fsync + timestamps
- journaling/crash-consistency
- sockets: AF_UNIX
- net: virtio-net + IPv4/ARP + sockets (TCP/UDP)
- cooperative, event-based scheduler for trusted kernel tasks
- MSIs + APLIC
- framebuffer with UTF-8/ANSI escape code support and keyboard/mouse input
- pzip/punzip
- psort
- reverse
- kv store
- concurrent web server
- distributed fs
- mapreduce
- fsck
- memcached
- bash-like shell
- stream kernel video to browser via VNC and WebRTC
- add live metrics
