Strat9 Docs
This website is generated from:
- mdBook pages for architecture and usage guides
- rustdoc API pages for ABI and syscall crates
API reference
Local generation
bash tools/scripts/build-docs-site.sh
python3 -m http.server --directory build/docs-site 8000
ABI Overview
The canonical ABI definitions live in workspace/abi (strat9-abi crate).
Focus modules:
strat9_abi::syscallfor syscall numbersstrat9_abi::datafor shared wire/data structsstrat9_abi::flagfor ABI-level flagsstrat9_abi::errnofor error codesstrat9_abi::bootfor boot handoff ABI
API reference:
ABI Changelog
This page tracks ABI evolution for strat9-abi.
Versioning policy
- Major (
ABI_VERSION_MAJOR) changes only for incompatible wire/layout changes. - Minor (
ABI_VERSION_MINOR) changes for backward-compatible additions. - No silent renumbering of existing syscall IDs.
repr(C)and explicit size checks are mandatory for exported ABI structs.
Current version
ABI_VERSION_MAJOR = 0ABI_VERSION_MINOR = 1- Packed:
0.1
See:
Recent ABI updates (auto-generated)
- 2026-03-09
ff0a36bRefactor memory management to use IRQ-disabled tokens - 2026-03-07
c3e8969Fix race condition and lock - 2026-03-07
6191656cargo fmt - 2026-03-07
8cd1410Refactor memory allocation and deallocation in the kernel : per-CPU frame cach and a CPU-local BuddySet avoids the global lock in the common case. - 2026-03-04
04b384efix(build): improve stage assembly error handling and warnings - 2026-03-03
2eb44c0feat(task): replace FpuState with ExtendedState, support xsave/xrstor - 2026-03-03
ae5480afeat(silo): add silo attach for live debug output monitoring - 2026-03-03
8c0056afeat: expand and reorganize shell commands with new utilities for hardware, process, and VFS, and update boot ABI structures. - 2026-03-03
e9cce98feat: Implement POSIX-compatibleclock_gettimesyscall and addcall::openwith POSIXO_*flag conversion. - 2026-03-03
04cbe05feat: Add comprehensive VFS operation self-tests, refine VFS error handling, and improve IPC port cleanup. - 2026-03-03
2642cf8docs: Add/// Implementsdoc comments to various functions across components for improved clarity. - 2026-03-03
ef0f1d7docs: Add documentation comments to ABI and syscall components and enhance error handling in the documentation build script. - 2026-03-03
f314904feat: ExpandFileStatwith additional POSIX fields and update kernel VFS schemes, and add anoncetoIpcHandshake. - 2026-03-03
769f3ebfeat: Update syscall ABI with struct layout adjustments, error encoding clarification, and versioning. - 2026-03-03
c23a68afeat: Ensure Limine bootloader directories exist, use a real time source forsetitimer, and additimervalvalue validation. - 2026-03-03
ea80816fix: CorrectO_NOFOLLOWflag value and add length bounds checks toDirentIterinitialization and name length assignment. - 2026-03-03
748f98cfeat: Addpreadandpwritesyscalls, enhance WASMproc_exithandling, and implement IPC port cleanup on task termination. - 2026-03-03
aa38e26refactor: Change network syscall error for missing device, add user page fault trace budget, and zero demand-paged memory after mapping. - 2026-03-03
326613afeat: Add PCI and handle ABI types, improve user page fault error reporting, ensure identity mapping for demand-paged frames, and update the build target triplet. - 2026-03-03
52f3586Enhance error handling by adding new error variants to the Error enum - 2026-03-03
6cf254dRefactor IPC message handling and update memory management logging - 2026-03-03
50d7f2fEnhance ABI structures and improve syscall error handling - 2026-03-03
607abacEnhance ABI introspection and improve syscall handling - 2026-03-03
deabb18Enhance Strat9 ABI integration and update OpenFlags implementation - 2026-03-03
92ba1c6Add strat9-abi as a workspace dependency and refactor bootloader integration - 2026-03-03
eb5de02Refactor variable names in BuddyAllocator and sys_sigtimedwait for clarity - 2026-03-03
259bb9dEnhance PCI support and update related components - 2026-03-02
c57b44dAddstrate-buscomponent and related build tasks. - 2026-03-01
8c7a98dEnhance QEMU GUI support and update related scripts - 2026-03-01
84fdb29Update zerocopy dependency and refactor related code
Changelog entries
0.1
- Introduced canonical
strat9-abicrate as single source of truth. - Unified syscall numbers in
strat9_abi::syscall. - Unified shared structs (
TimeSpec,IpcMessage,FileStat, PCI types). - Added boot handoff ABI (
KernelArgs,MemoryRegion,MemoryKind) with magic/version checks. - Added ABI introspection syscall
SYS_ABI_VERSION.
Entry template
Use this template for future ABI entries:
### X.Y
- Added:
- <new syscalls/types/flags>
- Changed (compatible):
- <field additions, new constants, optional semantics>
- Changed (breaking):
- <layout/numbering/semantic breaks>
- Migration notes:
- <what userspace/kernel must update>
ABI Support Matrix
Status of relibc platform APIs on x86_64-unknown-strat9.
Legend: OK = implemented, Stub = returns ENOSYS, Partial = limited.
POSIX File I/O
| API | Status | Notes |
|---|---|---|
| open / openat | OK | Via SYS_OPEN |
| read | OK | Via SYS_READ |
| write | OK | Via SYS_WRITE |
| close | OK | Via SYS_CLOSE |
| lseek | OK | Via SYS_LSEEK |
| pread | OK | Via SYS_PREAD |
| pwrite | OK | Via SYS_PWRITE |
| fstat / fstatat | OK | Via SYS_FSTAT / SYS_STAT |
| dup / dup2 | OK | Via SYS_DUP / SYS_DUP2 |
| pipe / pipe2 | OK | Via SYS_PIPE |
| fcntl | OK | Via SYS_FCNTL |
| mkdir / mkdirat | OK | Via SYS_MKDIR |
| unlink | OK | Via SYS_UNLINK |
| rmdir | OK | Via SYS_RMDIR |
| rename / renameat | OK | Via SYS_RENAME |
| link | OK | Via SYS_LINK |
| symlink | OK | Via SYS_SYMLINK |
| readlink | OK | Via SYS_READLINK |
| chmod / fchmod | OK | Via SYS_CHMOD / SYS_FCHMOD |
| truncate / ftruncate | OK | Via SYS_TRUNCATE / SYS_FTRUNCATE |
| chdir / fchdir | OK | Via SYS_CHDIR / SYS_FCHDIR |
| getcwd | OK | Via SYS_GETCWD |
| getdents | OK | Via SYS_GETDENTS |
| access | OK | Open + close probe |
| umask | OK | Via SYS_UMASK |
| fsync / fdatasync | Stub | ENOSYS |
| flock | Stub | ENOSYS |
| chown / fchown / lchown | Stub | ENOSYS |
| statvfs / fstatvfs | Stub | ENOSYS |
| mknod / mknodat / mkfifoat | Stub | ENOSYS |
Process Management
| API | Status | Notes |
|---|---|---|
| exit | OK | Via SYS_PROC_EXIT |
| fork | OK | Via SYS_PROC_FORK |
| execve | OK | Via SYS_PROC_EXEC |
| waitpid | OK | Via SYS_PROC_WAITPID |
| getpid / getppid / gettid | OK | |
| setsid / setpgid / getpgid / getsid | OK | |
| sched_yield | OK | Via SYS_PROC_YIELD |
| nanosleep | OK | Via SYS_NANOSLEEP |
| clock_gettime | OK | Via SYS_CLOCK_GETTIME |
| brk | OK | Via SYS_BRK |
| mmap / munmap | OK | Via SYS_MMAP / SYS_MUNMAP |
| uname | OK | Via SYS_PROC_UNAME |
| getuid / geteuid / getgid / getegid | Partial | Returns 0 (no UID model) |
| mprotect / mlock / munlock | Stub | ENOSYS |
| getrandom | Stub | ENOSYS |
Signals
| API | Status | Notes |
|---|---|---|
| kill | OK | Via SYS_KILL |
| sigaction | OK | Via SYS_SIGACTION |
| sigprocmask | OK | Via SYS_SIGPROCMASK |
| sigsuspend | OK | Via SYS_SIGSUSPEND |
| sigtimedwait | OK | Via SYS_SIGTIMEDWAIT |
| getitimer / setitimer | OK | Via SYS_GETITIMER / SYS_SETITIMER |
| sigaltstack | OK | Via SYS_SIGALTSTACK |
Network / Sockets
| API | Status | Notes |
|---|---|---|
| socketpair (AF_UNIX) | Partial | Backed by pipe (unidirectional) |
| recvfrom / sendto | Partial | Delegates to read/write |
| socket / bind / listen / accept / connect | Stub | ENOSYS |
| setsockopt / getsockopt | Stub | ENOSYS |
| shutdown | Stub | ENOSYS |
Epoll
| API | Status | Notes |
|---|---|---|
| epoll_create1 | Partial | Backed by pipe fd |
| epoll_ctl | Stub | No-op |
| epoll_pwait | Partial | Sleeps, no real multiplexing |
Syscall Layer
The userspace syscall crate is workspace/components/syscall (strat9-syscall).
Useful entry points:
strat9_syscall::callfor high-level wrappersstrat9_syscall::numberfor syscall constantsstrat9_syscall::errorfor userspace error mappingstrat9_syscall::datafor shared data structs
API reference:
Publishing
One-command publication script
At repository root:
./publish-doc.sh
This script:
- builds docs (
cargo make docs-site) - regenerates ABI changelog auto section from git history
- commits/pushes current branch changes
- uploads built website to
ggielly.github.io/strat9-os-docs
The docs builder publishes:
- mdBook pages under
docs-site/ - rustdoc for all workspace crates (
cargo doc --workspace --no-deps) - a combined static site in
build/docs-site