--- name: schunix-schapi-direction description: "Schunix is aimed at being a NeXTSTEP/macOS-shaped system with a native SchAPI over a POSIX personality, with permanent Windows-grade compatibility" metadata: node_type: memory type: project originSessionId: 9d8a2aef-bcf0-47a0-96c6-f706efab4a95 modified: 2026-08-07T16:29:50.730Z --- **Agreed 2026-08-06.** Schunix is no longer "a Unix-like kernel with a userland attached". It is aimed at being a **system**: NeXTSTEP/macOS-shaped layering, with POSIX/Unix kept complete but demoted from identity to *personality*, and a native higher-level API called **SchAPI** above it. Written up in `docs/plan/schapi.md`. The architecture is borrowed from macOS; the compatibility policy is borrowed from **Windows** (nothing is ever removed after 1.0). Those are two different systems — macOS drops things aggressively — and the mix is deliberate. **The load-bearing mechanism:** the stable ABI is a *library* (`libschunix`), not the syscall table. That is why macOS can renumber syscalls freely while old binaries keep working, and why Linux is stuck with every syscall mistake it ever made. Syscalls become private and renumberable; only libschunix may issue them. This does **not** contradict [[schunix-linux-abi-decision]] — Linux numbering stays as the Linux personality's entry path, frozen because Linux froze it, not because we did. Everything today is tier `provisional`; the freeze starts at 1.0 and covers only what is explicitly marked `stable` then. Committing now would enshrine things like the `fcntl(F_SETFL)` no-op fixed in [[schunix-doom-acceptance-test]]. `compat/` holds **shims written in terms of the current API**, not parallel implementations. If an old entry point cannot be expressed as a translation, that is a defect in the new API to fix *before* freezing. `src-trunk/` is a NetBSD checkout — reference material and a parts bin, never built, never in an image. Highest-value pieces: `sys/net`+`sys/netinet` (the TCP/IP stack, for the roadmap's Phase 2), `subr_pool.c` (slab allocator), and the autoconf driver model. **NetBSD is not uniformly licensed** — a minority of files still carry the 4-clause advertising clause and Berkeley's 1999 rescission only covers UC-copyrighted files. Check every file before copying: `grep -l "All advertising materials"`. See [[schunix-licensing]]. Ordering is unchanged: this is a direction, not a task. The native Windows build has to boot first — see [[schunix-build-environment]].