API Reference
Explore the libraries that ship Rux programs from portable application code down to direct operating-system APIs.
Evolving APIs
Rux and its packages are under active development. Public names, signatures, and behavior may change between releases. Pin dependency versions for reproducible builds.
Start with the standard library
Core strings, collections, I/O, memory, math, time, random values, encoding, hashing, UUIDs, and sorting.
StdStd::IoStd::MemoryStd::TimeStd::MathUse Std for application code unless you specifically need an operating-system contract. It provides the most portable surface and hides platform calling conventions.
Operating-system bindings
These packages expose low-level, platform-specific APIs for x86-64. They require explicit resource management, pointer validation, and manual error handling.
Direct syscall bindings shared across FreeBSD, OpenBSD, NetBSD, and DragonFly BSD.
I/OMemoryProcessTimeSyscallsRaw syscalls and typed wrappers for I/O, memory, processes, and time.
I/OMemoryProcessTimeSyscallsDirect Linux syscalls, constants, memory mappings, file-descriptor I/O, and clocks.
I/OMemoryProcessTimeSyscallsMach-O linker compatibility bindings for standard I/O, virtual memory, and process control.
I/OMemoryProcessConsoleWin32 bindings for files, consoles, heaps, processes, time, text conversion, and DLLs.
ConsoleHeapMemoryFilesystemProcessChoose the right package
| You need | Start here |
|---|---|
| Portable strings, collections, I/O, math, or time | Std |
| Direct syscalls across the BSD family | BSD |
| Direct illumos syscalls | Illumos |
| Direct Linux syscalls | Linux |
| Low-level macOS compatibility bindings | MacOS |
| Direct Win32 functions and types | Windows |
Add a package
Install a dependency with the CLI, then import only the symbols your program uses:
rux add Std
rux installimport Std::Io::PrintLine;
func Main() -> int {
PrintLine("Hello, Rux!");
return 0;
}See package dependencies for manifest syntax, version constraints, and local path dependencies.