Repository navigation
mcpplibs.os 0.1.0
mcpplibs.os 0.1.0 is a C++ operating-system library over openkal 0.17. openkal provides the kernel ABI as small, composable atoms. mcpplibs.os composes them and adds the conventions each system follows. A program built for a system reads that system's platform constants at compile time. A program built as an ok image (<arch>-openkal) learns its host at load through host().
| Module | Contents |
|---|---|
mcpplibs.os.platform |
PLATFORM, ARCH, is_linux / is_macos / is_windows / is_posix, exe_suffix, path_list_separator, host() |
mcpplibs.os.error |
errc (openkal's closed set of conditions), error, result<T> |
mcpplibs.os.env |
variables (case-insensitive names on Windows), arguments, the program's own image, directory lists (split_list, join_list), PATH search with PATHEXT |
mcpplibs.os.fs |
write_atomic, publish (no replace), caps, lock, links, set_executable, stamp_of, identity_of, locate, absolute, names_a_place; host naming rules: generic, native, is_absolute, same, within |
mcpplibs.os.process |
spawn, run, pipes, units and end_unit, bound lifetime, bounded waits and reads, self, describe, alive |
mcpplibs.os.interrupt |
requested, wait, end_as_requested |
mcpplibs.os.stdio |
the three streams as bytes |
mcpplibs.os.terminal |
interactive, size, sequences, color, raw_mode |
mcpplibs.os.dirs |
home, config, data, state, cache, runtime, temp |
mcpplibs.os.ipc |
a listener and a connection at a name in a directory, single_instance |
mcpplibs.os.net |
loopback TCP |
mcpplibs.os.machine |
the machine's architecture (seen through Rosetta and WoW64), memory |
mcpplibs.os.random |
bytes from the system's source of unpredictable bytes, hex |
mcpplibs.os.linux / .macos / .windows / .posix |
platform modules; every target declares them, and each is defined only on its own system |
Dependencies: openkal 0.17.0, plus the implementation for the target system (openkal-linux 0.18.0, openkal-macos 0.15.0 or openkal-windows 0.13.0). Builds of ok images also use openkal-llvm-runtime 0.16.0 and openkal-tools 0.1.0.
Use:
[dependencies.mcpplibs]
os = "0.1.0"