Foreign executable and application ABIs¶
Brand, personality, loader, and runtime¶
System extends the native zone facility with per-zone brand defaults and authorized per-process personality selection. A foreign application can run alone or in a full foreign userspace. Mixed-personality zones require explicit configuration. The components have distinct contracts.
Component |
Responsibility |
|---|---|
Zone |
Isolation, namespaces, lifecycle, and a resource domain. |
Brand |
The zone’s environment and default personality. |
Personality |
Syscall ABI, process and thread semantics, object model, and OS interfaces. |
Executable loader |
Parse, map, and bootstrap ELF, PE/COFF, or Mach-O images. |
Runtime |
Dynamic linking, runtime libraries, and higher-level APIs. |
The userspace loader chooses the ABI using executable metadata, brand policy, and authorized explicit selection. An ELF container can carry executables for several ABIs. Require the loader to handle native, foreign, unmarked, and conflicting metadata under an explicit policy. Pin supported ABI baselines per brand and architecture.
Launching from a native shell¶
A native shell can launch a supported foreign executable. By default, the launched process runs in an application zone with the foreign personality and its runtime root. The shell stays in its native zone. Launch policy authorizes the destination zone and the resources handed to the process, including standard streams, terminal access, and shared files. An explicitly selected full system zone can run the same application with that zone’s services.
Support explicit application-zone selection first. A configured launch
policy can then allow direct invocation such as ./program when the
loader recognizes the executable’s ABI and can select an authorized
runtime. Ambiguous ELF files, including static executables without
sufficient ABI metadata, require explicit selection. Reject metadata
that conflicts with the selected ABI.
The launcher obtains a ready personality endpoint through Native server activation and supervision before starting the foreign process. Site policy can authorize demand activation for the selected zone or require the administrator to start its personality ahead of the launch.
After selecting an ELF personality, resolve the executable’s original
PT_INTERP path and its runtime libraries within that personality’s
filesystem view. For example, a FreeBSD binary can request
/libexec/ld-elf.so.1 inside its FreeBSD runtime root. Native ELF
executables use the interpreter defined by the native ABI.
FreeBSD¶
FreeBSD is the first foreign Unix ABI candidate because System adopts
some BSD subsystems. The personality needs compatible ELF loading,
TLS, a runtime linker, and libraries. Implement the selected ABI’s
process and thread lifecycle, signals, umtx, descriptors, kqueue,
ioctl, sysctl, and compatible filesystem and device views.
Select a concrete FreeBSD ABI release for unmodified command-line and
graphical programs.
Linux¶
Start with AMD64, one UAPI compatibility baseline, and one distribution
root. The ABI uses its original ELF dynamic linker, glibc or musl,
TLS, and vDSO where needed. Preserve syscall and errno conventions,
clone and execution, wait and credentials, signal frames and exceptions,
and authorized process inspection. Provide mmap, mprotect,
memfd, and /dev/shm with Linux-compatible sharing semantics.
Implement futex, epoll, eventfd, timerfd, polling, and the asynchronous
I/O and io_uring operations required by the supported workloads.
Match readiness, wakeup, ordering, and cancellation rules. Expose
needed device UAPIs, ioctl layouts, sockets, and Netlink through native
device and network services. Linux namespaces, cgroups, and seccomp
use native enforcement. Add Linux bpf() and specialized UAPIs as
workloads require them.
The Linux root exposes its own /proc, /sys, and /dev, including
CPU and process information, /proc/self/fd, devices, and resource
information according to zone policy. Native Resource domain controls
back the Linux cgroup interface. Support standard package managers and
userspace utilities on the selected distribution. Full system zones also require
distribution init, systemd where used, D-Bus, service management,
and distribution-specific behavior. Linux kernel modules and
kernel-dependent anti-cheat are outside this ABI contract.
Use SmartOS or illumos LX, FreeBSD Linuxulator, and gVisor as reuse and design references where licenses and service boundaries fit.
Graphical applications and desktops¶
Start with X11 and Wayland clients in an application zone using the shared native display path. Add software rendering first, then GPU acceleration and larger applications such as Chrome or Chromium, Firefox, and VS Code where matching binaries exist. Native graphics and display sharing are described in Graphics and desktop.
Chromium additionally depends on compatible glibc, TLS, process creation, signals, shared memory, futexes, epoll/eventfd/timerfd, namespaces, and seccomp. The compatibility boundary must support Chromium’s sandbox with real enforcement. Full system zones can later run a GNOME, KDE, or Hyprland session with its own init, D-Bus, audio, and desktop services.
Windows¶
Reuse suitable Wine runtime components and Wine’s Win32/NTDLL,
DLLs, and wineserver support. ReactOS is a reference for NT semantics.
The personality covers PE/COFF executable and DLL loading, process and
thread initialization, exceptions, and NT calls needed by the target
applications. Implement NT handles and objects, synchronization,
sections and shared memory, NT paths, the registry, and appropriate
process and service semantics. Adapt backend integration to native
services while retaining working upstream machinery. Use Wine, DXVK,
and VKD3D where appropriate for DirectX translation.
The execution framework recognizes .exe programs and starts the
needed runtime without a separate user’s launcher command. The zone
provides a Windows-style runtime, filesystem view, and registry on
System. Start with selected AMD64 applications. ARM64, 32-bit execution,
WOW64, extensive COM and services, and arbitrary Windows driver support
are separate coverage expansions.
Darwin¶
Start with selected same-ISA AMD64 or ARM64 Darwin command-line
applications. Provide Mach-O loading, dyld, runtime initialization,
libSystem-compatible interfaces, and the required BSD and Mach syscalls.
Map Mach tasks, threads, port rights, and message semantics to native
objects where the semantics fit. Back Mach VM objects and exception
delivery with native VM and exception mechanisms.
Use Darling and public XNU/Darwin interfaces as references. Reuse suitable Darling components, open-source frameworks, libdispatch, and launchd-style service management where practical. Provide expected Darwin filesystem and runtime namespaces. Cocoa, Quartz, Metal, IOKit, Apple-specific services, and proprietary dependencies expand the compatibility work beyond the initial Darwin baseline. Redistribution depends on each component’s license.