Skip to content

Releases: mcpplibs/os

0.2.6

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 31 Oct 23:47
ac6c545

openkal-macos 0.17.1: kal_task_current without a system call. The interface is unchanged. An ok image over this release selects openkal-platform 0.20.1.

0.2.5

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 31 Oct 21:27
3261956

openkal 0.19.0 (openkal-linux 0.20.0, openkal-macos 0.17.0, openkal-windows 0.15.0, openkal-emscripten 0.8.0). The interface is unchanged. An ok image over this release selects openkal-platform 0.20.0.

os 0.2.4

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 30 Oct 16:07
9767bc3
  • openkal 0.18. openkal 0.18.0 and its implementations: openkal-linux 0.19.0, openkal-macos 0.16.0, openkal-windows 0.14.0 (openkal.map), openkal-emscripten 0.7.0 (openkal.map absent).
  • An ok image over this release selects openkal-platform 0.19.0 or a later group naming openkal 0.18: the openkal rows of mcpp 2026.10.31.2 pin 0.18.0, whose group names openkal 0.17.1. CI's ok images select it with MCPP_PLATFORM; checks/hosted with its manifest.

os 0.2.3

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 29 Oct 22:50
e6067aa

openkal-linux 0.18.3: every directory handle is opened with O_PATH, so a program started by absolute name is found in a directory the process may search but not read (the Android app sandbox, mcpp-community/mcpp#857). CI on mcpp 2026.10.30.1; checks/hosted on openkal-platform 0.18.0.

os 0.2.1

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 28 Oct 13:56
7231289
  • The ok-image targets take their C library, C++ run-time and loader from
    their platform.
    [target.'cfg(os = "openkal")'] no longer declares
    openkal-llvm-runtime or openkal-tools: mcpp 2026.10.27.1 selects
    openkal-platform for <arch>-openkal (mcpp SPEC-013). CI finds the runner
    through mcpp toolchain install --target and mcpp self env --target.

The package builds and its tests pass in every arrangement of the program's C
library on Linux, macOS and Windows: the system's own (glibc, libSystem, the
Microsoft C runtime), and a C library that sits on openkal (openkal-musl with
openkal-llvm-runtime, mcpp docs/24) on the system's own triple. Under the
second, a C library presents POSIX and openkal, not the system: its headers are
not the SDK's, on Windows its data model is LP64 and its wchar_t 32 bits, and
its descriptors, signals, uname, sysinfo and syscall are its own.

  • The units beside openkal reach each system through that system's stable
    interface, not through the C library.
    • Linux: the kernel's calls, one trap per architecture
      (src/linux/kernel.h, src/linux/arch/). These cover the machine's name
      and memory, a volume's kind and an exchange of two entries. In the second
      arrangement the C library had answered openkal for the machine, had no
      sysinfo, and turned renameat2(RENAME_EXCHANGE) into a plain rename that
      replaced the second entry.
    • macOS: the kernel's calls for a volume's kind and an exchange
      (src/macos/kernel.h, as openkal-macos itself does), and the libSystem
      names no C library defines for sysctl and the host's statistics
      (src/macos/darwin.h). These are declared rather than included from the
      SDK. A link whose libSystem is openkal-macos's stub binds them when the
      program is loaded (-U).
    • Windows: src/windows/win32.h declares DWORD as 32 bits and WCHAR as
      UTF-16 (char16_t) under every C environment. Names reach the system as
      UTF-8 converted to UTF-16, never through path::c_str() (R7). The
      kernel32 names that openkal-windows does not itself call are found when
      first called, so a toolchain without the system's import libraries links
      the package.
  • The process's output and its ending for a closed reader are changed where
    the process keeps them.
    • On Linux and macOS, the diversion of the standard output (output_to_error),
      the reset of SIGPIPE before exec and end_as_output_closed use the
      kernel's descriptors and dispositions (src/posix/kernel.h): what openkal's
      standard output, the C library's and a started program all use.
    • On Windows the diversion moves the Microsoft C runtime's descriptor, as
      before (src/windows/crt/stdio.cpp). For a C library on openkal it moves
      that library's descriptor and the process's standard handle, each apart
      (src/windows/posix/stdio.cpp). The manifest selects the form by
      cfg(c-abi = "musl").
  • checks/hosted builds the package's tests over openkal-musl and
    openkal-llvm-runtime. CI runs them on Linux, macOS and Windows, beside the
    native rows and the ok images. Locally, the native and hosted suites pass on
    Linux x86_64 (gcc 16.1.0 and llvm 23.1.3, dev and release) and on aarch64
    under qemu. The Windows and macOS builds are cross-linked from Linux.
  • What mcpp-language-server's operating-system layer carried (its
    modules/os and modules/platform, removed in its 0.0.18):
    • process::run(options, bounds, input): a run with a hard bound, a grace
      and a drain, and limits on what each output keeps. It reports a timeout,
      an output a descendant held open, and an output it cut.
    • process::threads(id): the threads of a program and the processor time of
      each (Linux; none elsewhere).
    • env::assignments(entries): NAME=value entries as the overrides of a
      started program's environment.
    • fs::read(file, at_most): a bounded read, errc::too_large past the
      bound (new error condition).
    • fs::canonical(name): the name a node is known by, with links followed
      and, on Windows, short (8.3) components replaced by their long names.
  • Tests: platform_test asserts that Linux names the machine as the processor
    the program runs on. fs_test asserts that a volume's kind is named.
    process_test makes a file executable with os::fs::set_executable rather
    than with std::filesystem::permissions, which a C library on openkal
    refuses. process_test covers the bounded run (a cut output, a hard bound,
    an output held open), the threads of this program and environment entries;
    fs_test covers the bounded read and the canonical name.

os 0.2.0

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 27 Oct 08:39
297584f

exec; both outputs on one pipe; appending and durability; measured volumes; place and exchange; owners, processors and available memory; a bounded read of input; output sent to the error stream; raw mode that keeps the interrupt; Windows facts. Over openkal 0.17.1 (openkal-linux 0.18.2, openkal-macos 0.15.1, openkal-windows 0.13.3); ok images over openkal-llvm-runtime 0.16.3 and openkal-tools 0.1.1 (#3).

mcpplibs.os 0.1.1

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 27 Oct 02:13
aef149c

mcpplibs.os 0.1.1 is a patch release of 0.1.0. Names now reach the system as UTF-8 and come back as UTF-8 on every host, never through the process's code page (README rule R7).

On Windows (MSVC), path::string(), path::generic_string() and path(std::string) use the ANSI code page:

  • A name the code page cannot spell threw, and inside the library that ended the program (0xC0000409).
  • A name the code page can spell reached openkal-windows as ANSI bytes, but openkal reads names as UTF-8, so the file opened was the wrong one.

0.1.1 adds os::fs::utf8, generic_utf8 and from_utf8, and every name in fs, process, env, dirs, ipc and the Windows module now goes through them. fs_test writes, reads, replaces and renames a file whose directory and name are in four scripts. POSIX behaviour is unchanged.

[dependencies]
mcpplibs.os = "0.1.1"

mcpplibs.os 0.1.0

Choose a tag to compare

@Sunrisepeak Sunrisepeak released this 26 Oct 19:32
d8abb15

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"

Pull requests: #1, #2.