Skip to content

openkal 0.13 and the packages that follow it; openkal compatibility labels - #437

Merged
Sunrisepeak merged 6 commits into
mainfrom
openkal-0.13
Sep 17, 2026
Merged

Sunrisepeak merged 6 commits into
mainfrom
openkal-0.13

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Draft: the openkal 0.13 wave's descriptors (openkal 0.13.0, openkal-linux 0.13.0, openkal-macos 0.10.0, openkal-windows 0.8.0, openkal-emscripten 0.2.0, openkal-opensbi 0.7.0, openkal-uefi 0.7.0, std-freestanding-alloc-kal 0.1.6, openkal-musl 0.14.0, openkal-llvm-runtime 0.10.0, tinyhttps 0.3.1) and the mcpp pin that carries mcpp#662 are added as each is released.

Already here:

  • tests/openkal/compat.py, tests/openkal/{pins,members}.toml, .github/workflows/openkal-compat.yml: measured openkal labels.
  • .xpkgindex/plugins/mcpp.py: an openkal facet and a per-target result block.
  • docs/openkal-compat.md (and zh): what the label means and the adaptation rules.
  • compat.zlib on cfg(all(windows, c-abi = "musl")) and tests/examples/zlib asserting z_off_t agreement. Closes the zlib half of mcpp#662's follow-up.

Design: mcpplibs/openkal .agents/docs/2026-09-17-openkal-ecosystem-cross-repo-design.md.

…dows with musl

tests/openkal/compat.py measures the members listed in tests/openkal/members.toml
in an openkal graph (Linux natively, Windows cross-built and run through Wine)
and writes .xpkgindex/openkal-compat.json. The site files packages under an
openkal facet by that measurement and shows each target's result with the pins
it was measured with; a descriptor has no field for it. openkal-compat.yml runs
weekly, on demand, and for pull requests that change a descriptor a listed member
depends on; the comparison against published labels becomes required once
OPENKAL_RATCHET is on. docs/openkal-compat.md states the label and the adaptation
rules (select on c-abi; do not undefine a platform macro; one reading of a
public header; assert a changed configuration across the boundary; one C runtime
per image).

compat.zlib: on cfg(all(windows, c-abi = "musl")) zlib's own units are built
without _WIN32, which zlib reads as the Windows C runtime being present, and
with unistd.h included directly so that zconf.h computes z_off_t identically
for zlib and its consumers. tests/examples/zlib asserts that agreement through
zlibCompileFlags() and exercises deflate and gz files.
…s own units

mbedtls chooses its entropy, timing and socket code by asking whether the
environment is Windows or Unix. With musl as the C library on Windows (an
openkal graph) the answer the triple gives is Windows and the headers are
POSIX, so timing.c included windows.h and failed (mcpp-index#435 through
tinyhttps). mbedtls's own units are built without _WIN32 and with __unix__
there; no public header of mbedtls tests either macro. -lbcrypt applies to
Windows with the platform C runtime only.

Measured with mcpp carrying #662: tinyhttps's openkal example cross-builds for
x86_64-windows-gnu and runs its framing tests under Wine.
The not(c-abi = "musl") selection did not reach the Windows workspace link with
the pinned mcpp (BCryptGenRandom undefined). The unconditional platform flag is
restored; on Windows with musl the import library is named and unused, which
links (measured with mcpp carrying #662, run under Wine).
…indows 0.8.0, openkal-opensbi 0.7.0, openkal-uefi 0.7.0, tinyhttps 0.3.1

Each archive is the GitHub tag archive, mirrored to GitCode mcpp-res with the
same bytes (sha256 checked on both).
@Sunrisepeak
Sunrisepeak marked this pull request as ready for review September 17, 2026 10:42
@Sunrisepeak
Sunrisepeak merged commit 46766c7 into main Sep 17, 2026
16 checks passed
Sunrisepeak added a commit that referenced this pull request Sep 17, 2026
…barchive under openkal; CI and the openkal measurement move to mcpp 2026.9.17.3 (#438)

* openkal-emscripten 0.2.0, std-freestanding-alloc-kal 0.1.6, and CI builds against mcpp 2026.9.17.3

The two packages resolve openkal 0.13.0 from this index, so their releases
follow #437. mcpp 2026.9.17.3 carries #662: a dependency graph that supplies the
C library is no longer mixed with the host's own headers. validate.yml and the
openkal compatibility measurement both move to it, and the measurement takes
openkal-llvm-runtime 0.10.0 (openkal-musl 0.14.0, openkal 0.13).

* compat.libarchive: macOS with musl builds without the Apple SDK (#434)

libarchive reads __APPLE__ as the Apple SDK being present (TargetConditionals.h,
copyfile, quarantine) in four private units and in the generated configuration;
in an openkal graph for macOS the SDK is not there. __APPLE__ is removed from
libarchive's own units under cfg(all(macos, c-abi = "musl")); archive.h and
archive_entry.h do not test it. Measured with mcpp 2026.9.17.3: the archive
member cross-builds for aarch64-macos above openkal-macos 0.10.0.

Windows with musl is not adapted, and the reason is recorded here rather than
worked around: libarchive writes wide string literals, which the Windows target
makes sixteen bits while musl's wchar_t is thirty-two, and openkal-musl refuses
that mixture on purpose (musl/PATCHES.md). The measurement reports it.

* compat.libarchive on Linux with musl, and the tinyhttps member at 0.3.1

The measurement against mcpp 2026.9.17.3 showed the archive member failing on
Linux above openkal: the Linux host configuration names linux/fs.h and its
neighbours, which belong to the kernel's interface and were reached only
because the compiler searched the host before mcpp#662. Under
cfg(all(linux, c-abi = "musl")) the generated configuration removes them as
it does on every other system; the member runs again.

The tinyhttps member names 0.3.1, which selects POSIX sockets on Windows with
musl; the measurement had been taken against 0.3.0.

* openkal-compat: a measurement requested on another branch proposes nothing

* compat.py: a measured copy resolves compat from this checkout

A copy of a member is not a member of the workspace and did not inherit its
[indices], so compat resolved from the published index and a descriptor changed
in a pull request was not the one measured (the archive member measured
libarchive's published descriptor). The copy now names this checkout when the
member declares no [indices] of its own.

* openkal compatibility: the measurement of 2026-09-17

Measured by openkal-compat run 35222831479 with mcpp 2026.9.17.3,
openkal-llvm-runtime 0.10.0 and llvm@22.1.8, the host's mingw headers installed.
x86_64-linux-gnu: 27 members run, 3 fail (cmp-module and curl name Linux kernel
headers or epoll, which openkal does not provide; expat calls arc4random_buf,
which musl does not declare). x86_64-windows-gnu, run through Wine: 15 run,
15 fail, each on a Windows or MinGW header its package includes on _WIN32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant