Flac OS - educational x86-64 operating system (static kernel in C + Rust)
  • C 88.5%
  • Python 7.7%
  • Rust 3%
  • Assembly 0.4%
  • Batchfile 0.3%
Find a file
2026-10-30 21:52:24 +02:00
boot/limine Initial import of Vivid OS 2026-10-29 21:33:55 +02:00
docs NetSurf: bookmarks (star in the address pill, Ctrl+D) and history, with flac:bookmarks and flac:history pages served by a flac: fetcher 2026-10-30 13:27:48 +02:00
static FlacOS Setup: a separate setup disk (build/setup.img) that boots into the installer only, restarts into the new system; run.bat setup 2026-10-30 12:40:21 +02:00
tools Wallpapers follow the theme: a light and a dark picture for each (switching the appearance changes the wallpaper) 2026-10-30 14:23:56 +02:00
user Displays: custom resolution, 15 second Keep/Revert confirmation, refresh rate (30-144 Hz) 2026-10-30 21:52:24 +02:00
.gitignore NetSurf port (first working version) and musl on the Linux ABI 2026-10-30 00:02:33 +02:00
build.py Four picture wallpapers (Aurora, Dunes, Silk, Glow) generated by tools/genwallpapers.py, scaled to cover the screen; picker in Settings; Aurora is the default for new users 2026-10-30 14:16:43 +02:00
project.md Displays: custom resolution, 15 second Keep/Revert confirmation, refresh rate (30-144 Hz) 2026-10-30 21:52:24 +02:00
README.md Real file operations: Files with Cut/Copy/Paste across windows, Rename, Delete with confirmation, Properties, sorting, dates, New text document; ~/Desktop files on the desktop with their own context menu; richer desktop menu (new items, paste, settings) 2026-10-30 14:45:01 +02:00
run.bat FlacOS Setup: a separate setup disk (build/setup.img) that boots into the installer only, restarts into the new system; run.bat setup 2026-10-30 12:40:21 +02:00

FlacOS

An educational x86-64 operating system. The kernel is called static (static.sys, C + Rust); the system itself is FlacOS. It boots via UEFI with Limine and runs in QEMU (main path) or VMware Workstation (script provided, not tested on a live install).

Features

  • Kernel: scheduler, ring 3, system calls, virtual memory, object namespace, ATA with bus-master DMA, GPT, VFS + FAT32 (in Rust), network stack (e1000, ARP, IPv4, ICMP, UDP, DNS, DHCP, TCP, sockets), TLS 1.2 client with certificate verification, zsh-like shell.
  • Graphics: Bochs VGA and virtio-gpu; a desktop compositor and window manager with a floating top bar, dock, animations, wallpaper blur and a lock screen; four generated picture wallpapers (Aurora, Dunes, Silk, Glow; tools/genwallpapers.py), each in a light and a dark version that follows the theme. Right click works like in a desktop file manager: on the desktop (Refresh, New folder, New text document, Paste, display and personalization settings; the files of ~/Desktop are shown as icons), on a file or folder (Open, Cut, Copy, Delete, Rename), on a title bar and on a dock icon. Files has Cut/Copy/Paste between windows, Rename (F2), Delete with a confirmation, Properties, sorting and New text document.
  • Apps: terminal, files, settings, notepad, calculator, browser (HTTP/HTTPS, CSS subset, PNG/JPEG/GIF, no JS), monitor, installer.
  • Linux programs: static x86-64 ELF and static-PIE binaries run through a Linux syscall layer (files, fork/execve/wait4, pipes, tty).
  • NetSurf: the NetSurf 3.11 browser (full HTML5/CSS engine) ported as a Linux static executable with a FlacOS frontend (window, HTTP/HTTPS with verified certificates, PNG/JPEG/GIF/BMP and SVG, cookies, JavaScript through Duktape); optional, built by tools/netsurf/.
  • Sound: Intel AC97 output (48 kHz stereo); beep, play file.wav, volume; /dev/dsp (OSS) for Linux programs.
  • Users: several accounts, each with its own /home/<name> and ~/.config; sign-in on the lock screen and in the text console; useradd, passwd, userdel, su.
  • Installer / Setup: GPT partitioning, FAT32 format, system copy, user account, language, hostname. uild/setup.img is a separate setup disk\n (like a Windows install medium): it boots into the installer only, no desktop around it.

Requirements

  • QEMU (e.g. scoop install qemu)
  • LLVM/clang, Rust with the x86_64-unknown-none target
  • Python 3 with Pillow, PyMuPDF and resvg_py
  • Optional, for NetSurf and other Linux programs: Zig (scoop install zig; used as zig cc -target x86_64-linux-musl)
  • Optional, for JavaScript in NetSurf: flex and bison to build its binding generator (scoop install winflexbison)
  • Optional: enable the Windows "Windows Hypervisor Platform" feature (WHPX) for fast QEMU instead of slow TCG

Build and run

run.bat                 build (incremental) and start QEMU
run.bat rebuild         rebuild from scratch
run.bat serial          also attach the kernel log (COM1) to the console
run.bat install         live system + blank second disk (build\target.img) to install onto
run.bat setup           FlacOS Setup, like a PC with a blank disk: the setup disk (build\setup.img) boots straight into the installer, Restart now
                        reboots, and the new system starts from the new disk by itself
run.bat installed       boot the installed system (build\target.img)
set FLAC_VM=vmware     run in VMware Workstation/Player instead
set FLAC_AUDIO=wav:out.wav  record the sound card to a file (default: dsound; none = silent)
python build.py                          kernel + apps + disk image build/static.img
python build.py --session console        text console image instead of the desktop
python build.py mktarget                 blank disk build/target.img (size: FLAC_TARGET_MB, default 64)
python tools/qtest.py "uname -a" ...     console test over serial (needs --session console)
python tools/dtest.py ...                desktop test: mouse, keys, screenshot (see the file's docstring)
python tools/netsurf/fetch.py            download NetSurf and its libraries into third_party/ (not stored in the repository)
python tools/netsurf/build.py            build build/netsurf/netsurf; python build.py then puts it in the image

NetSurf starts from Applications > NetSurf, or netsurf <address> in the terminal. JavaScript (Duktape) runs while a page loads: DOM, document.write, innerHTML, JSON; changes made later by timers or clicks are not redrawn. Safari-style window (address pill with a bookmark star, tab bar from two tabs; Ctrl+T new tab, Ctrl+W close, Ctrl+D bookmark, Ctrl+B bookmarks and history); PNG and JPEG go through the FlacOS decoders (user/lib/img.c, user/netsurf/vimg.c).

run.bat must keep CRLF line endings.

Layout

Path Contents
static/ Kernel: hal, ke, mm, ob, io, fs, net, rtl, subsys, and fat32rs (Rust FAT32)
user/ Userspace SDK (lib/), apps (apps/, disabled ones in apps_extra/), fonts, icons
boot/limine/ Bootloader
tools/ Python helpers, font and icon sources
docs/ARCHITECTURE.md Architecture notes
project.md Detailed project overview (in Russian)

Known limitations

  • HTTPS certificates are verified against the Mozilla root store, but without revocation checks (CRL/OCSP); random numbers come from a weak source (TSC).
  • The browser has no JavaScript; CSS is a subset (no float/flex/grid); JPEG must be baseline.
  • There is no privilege separation: FAT has no owners or permissions, so users differ by settings and home directories only.
  • Under VMware video goes through firmware GOP (no resolution change in Settings).
  • static/include/con.h has a Windows-reserved name (CON); it may fail to check out on Windows.

Roadmap

  • Dynamic linking and threads for Linux programs.
  • More sound hardware (Intel HDA) and audio input; file permissions and ownership (needs a different file system).

Licenses of third-party assets

Fluent UI System Icons and Fluent Emoji (MIT), Inter and JetBrains Mono (SIL OFL), MacTahoe cursors (GPL-3.0), Limine (BSD-2), Mozilla root certificates (MPL-2.0, via certifi). License files are next to the sources in tools/icons_src/ and boot/limine/.