Skip to content
OS-specific Primitives

OS-specific Primitives

OS-specific substrate primitives

Substrate modules whose implementation is platform-gated. A few depend on Linux-specific facilities (MAP_HUGETLB); most share one surface across several OSes, with only the syscall layer gated. Each is compiled away where unsupported, so the workspace stays buildable everywhere.

PrimitiveModuleOS supportCargo feature
DirectFileRingprotocol_direct_fileUnix + Windows (O_DIRECT / F_NOCACHE / FILE_FLAG_NO_BUFFERING)none
fd_handoff verb pairfd_handoffUnix SCM_RIGHTS (incl. macOS) + Windows DuplicateHandlenone
KernelAsyncRing (src )kernel_async_ringLinux (io_uring) / Windows (IoRing) / FreeBSD + macOS (POSIX aio)none
HugepageRegionhugepagesLinux only (MAP_HUGETLB)none
SuperPageRegion (src )super_pagesFreeBSD (MAP_ALIGNED_SUPER) + macOS x86_64 (VM_FLAGS_SUPERPAGE_SIZE_2MB)none
VsockSocketlocale_vsockLinux (AF_VSOCK) + Windows (Hyper-V AF_HYPERV)none
WireSocketlocale_wireLinux (AF_XDP) / Windows (XDP) / FreeBSD (netmap) / macOS (BPF)wire-locale

E2E verification of these primitives runs their real example binaries on a hosted Linux VM (the Linux-only locales never execute on Windows, so that VM is where their close gate runs).