Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ members = [
"tests/examples/mcr",
"tests/examples/openkal",
"tests/examples/openkal-musl",
"tests/examples/compiler-rt-builtins",
]

# ── The index redirect, hoisted to the workspace root ───────────────────
Expand Down
21 changes: 21 additions & 0 deletions pkgs/l/llvm.compiler-rt-builtins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ package = {

xpm = {
linux = {
["22.1.8.6"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.6.tar.gz",
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.6/compiler-rt-builtins-22.1.8.6.tar.gz",
},
sha256 = "14f246381c8667f978fc841ce89f91ee9c49823b90a7ff5cc6613b02c341a97b",
},
["22.1.8.5"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.5.tar.gz",
Expand Down Expand Up @@ -79,6 +86,13 @@ package = {
},
},
macosx = {
["22.1.8.6"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.6.tar.gz",
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.6/compiler-rt-builtins-22.1.8.6.tar.gz",
},
sha256 = "14f246381c8667f978fc841ce89f91ee9c49823b90a7ff5cc6613b02c341a97b",
},
["22.1.8.5"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.5.tar.gz",
Expand Down Expand Up @@ -109,6 +123,13 @@ package = {
},
},
windows = {
["22.1.8.6"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.6.tar.gz",
CN = "https://gitcode.com/mcpp-res/compiler-rt-builtins/releases/download/22.1.8.6/compiler-rt-builtins-22.1.8.6.tar.gz",
},
sha256 = "14f246381c8667f978fc841ce89f91ee9c49823b90a7ff5cc6613b02c341a97b",
},
["22.1.8.5"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/compiler-rt-builtins/archive/refs/tags/22.1.8.5.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-linux.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ package = {

xpm = {
linux = {
["0.18.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.18.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.18.0/openkal-linux-0.18.0.tar.gz",
},
sha256 = "5b14b0a722516e0058f2fc93926df871e707a87b362accc4380b1b1fd3331036",
},
["0.17.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.17.0.tar.gz",
Expand Down Expand Up @@ -154,6 +161,13 @@ package = {
},
},
macosx = {
["0.18.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.18.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.18.0/openkal-linux-0.18.0.tar.gz",
},
sha256 = "5b14b0a722516e0058f2fc93926df871e707a87b362accc4380b1b1fd3331036",
},
["0.17.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.17.0.tar.gz",
Expand Down Expand Up @@ -289,6 +303,13 @@ package = {
},
},
windows = {
["0.18.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.18.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.18.0/openkal-linux-0.18.0.tar.gz",
},
sha256 = "5b14b0a722516e0058f2fc93926df871e707a87b362accc4380b1b1fd3331036",
},
["0.17.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.17.0.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-macos.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ package = {

xpm = {
linux = {
["0.15.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.15.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.15.0/openkal-macos-0.15.0.tar.gz",
},
sha256 = "03aabc35c948b836f79ff2a65cc4df074a8de615c5f2017728b7ad2c51495dc4",
},
["0.14.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.14.1.tar.gz",
Expand Down Expand Up @@ -161,6 +168,13 @@ package = {
},
},
macosx = {
["0.15.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.15.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.15.0/openkal-macos-0.15.0.tar.gz",
},
sha256 = "03aabc35c948b836f79ff2a65cc4df074a8de615c5f2017728b7ad2c51495dc4",
},
["0.14.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.14.1.tar.gz",
Expand Down Expand Up @@ -303,6 +317,13 @@ package = {
},
},
windows = {
["0.15.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.15.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.15.0/openkal-macos-0.15.0.tar.gz",
},
sha256 = "03aabc35c948b836f79ff2a65cc4df074a8de615c5f2017728b7ad2c51495dc4",
},
["0.14.1"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.14.1.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal-windows.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ package = {

xpm = {
linux = {
["0.13.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.13.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.13.0/openkal-windows-0.13.0.tar.gz",
},
sha256 = "6fc7519fbe61a11249232949fe46c66d946ae3f55c15d0146cbedd048b4edb5d",
},
["0.12.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.12.0.tar.gz",
Expand Down Expand Up @@ -177,6 +184,13 @@ package = {
},
},
macosx = {
["0.13.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.13.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.13.0/openkal-windows-0.13.0.tar.gz",
},
sha256 = "6fc7519fbe61a11249232949fe46c66d946ae3f55c15d0146cbedd048b4edb5d",
},
["0.12.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.12.0.tar.gz",
Expand Down Expand Up @@ -333,6 +347,13 @@ package = {
},
},
windows = {
["0.13.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.13.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.13.0/openkal-windows-0.13.0.tar.gz",
},
sha256 = "6fc7519fbe61a11249232949fe46c66d946ae3f55c15d0146cbedd048b4edb5d",
},
["0.12.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.12.0.tar.gz",
Expand Down
21 changes: 21 additions & 0 deletions pkgs/o/openkal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ package = {

xpm = {
linux = {
["0.17.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.17.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.17.0/openkal-0.17.0.tar.gz",
},
sha256 = "a4ab09d6f9fd69f056ae89e98b775987cf65a7200460aec5363360c342de4639",
},
["0.16.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.16.0.tar.gz",
Expand Down Expand Up @@ -129,6 +136,13 @@ package = {
},
},
macosx = {
["0.17.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.17.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.17.0/openkal-0.17.0.tar.gz",
},
sha256 = "a4ab09d6f9fd69f056ae89e98b775987cf65a7200460aec5363360c342de4639",
},
["0.16.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.16.0.tar.gz",
Expand Down Expand Up @@ -236,6 +250,13 @@ package = {
},
},
windows = {
["0.17.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.17.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.17.0/openkal-0.17.0.tar.gz",
},
sha256 = "a4ab09d6f9fd69f056ae89e98b775987cf65a7200460aec5363360c342de4639",
},
["0.16.0"] = {
url = {
GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.16.0.tar.gz",
Expand Down
16 changes: 16 additions & 0 deletions tests/examples/compiler-rt-builtins/mcpp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# llvm.compiler-rt-builtins test project. The package is the builtins of the
# rows that have no compiler-rt of their own: an ok image (`<arch>-openkal`),
# where openkal-musl's `image-builtins` feature asks for it, and the bare-metal
# rows. No runner here builds those targets, so the member names the package
# under `cfg(os = "openkal")` alone and the candidate gate asks it nothing: the
# package's own CI builds every row it serves. On the runners the member is an
# ordinary program, which keeps the descriptor resolvable by name.
[package]
name = "compiler-rt-builtins-tests"
version = "0.1.0"

[target.'cfg(os = "openkal")'.dependencies.llvm]
compiler-rt-builtins = "22.1.8.6"

[indices]
mcpplibs = { path = "../../.." }
10 changes: 10 additions & 0 deletions tests/examples/compiler-rt-builtins/tests/resolves.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// The member builds on every runner; the package it names is for the ok-image rows.
import std;

int main() {
// 128-bit division, which the builtins supply on the rows this package serves.
const unsigned __int128 n = (static_cast<unsigned __int128>(1) << 100) + 7;
const unsigned __int128 q = n / 3;
std::println("compiler-rt-builtins-tests: {}", static_cast<unsigned long long>(q % 1000003));
return q * 3 + (n % 3) == n ? 0 : 1;
}
8 changes: 4 additions & 4 deletions tests/examples/openkal/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ name = "openkal-tests"
version = "0.1.0"

[dependencies.mcpplibs]
openkal = "0.16.0"
openkal = "0.17.0"

[target.'cfg(os = "linux")'.dependencies.mcpplibs]
openkal-linux = "0.17.0"
openkal-linux = "0.18.0"

[target.'cfg(os = "macos")'.dependencies.mcpplibs]
openkal-macos = "0.14.1"
openkal-macos = "0.15.0"

[target.'cfg(windows)'.dependencies.mcpplibs]
openkal-windows = "0.12.0"
openkal-windows = "0.13.0"

[target.'cfg(all(os = "linux", env = "musl"))'.dependencies.mcpplibs]
openkal-llvm-runtime = "0.15.6"
Expand Down
37 changes: 32 additions & 5 deletions tests/examples/openkal/tests/kal.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// The C surface of openkal through the implementation for this system.
//
// One observation per declaration the newest round added, in the terms a
// caller relies on: a context started with a least stack size is told at least
// that size and has the room; a closed directory's enumeration is refused; the
// input position is not an error to ask for. The terminal is not observed here,
// Observations of the declarations recent rounds added, in the terms a caller
// relies on: a context started with a least stack size is told at least that
// size and has the room; a closed directory's enumeration is refused; and
// (0.17) the system is named, this program names itself with the moment it
// started, and a rename that does not replace refuses a name that is taken. The terminal is not observed here,
// because a test run has none; the implementations observe it on a terminal
// they make.
#include <openkal/env.h>
#include <openkal/fs.h>
#include <openkal/process.h>
#include <openkal/stream.h>
#include <openkal/task.h>
#include <openkal/version.h>
Expand Down Expand Up @@ -37,7 +40,7 @@ void room(void* p) {
}

int main() {
check(KAL_VERSION_MINOR >= 16u || KAL_VERSION_MAJOR > 0u, "the declarations are openkal 0.16 or later");
check(KAL_VERSION_MINOR >= 17u || KAL_VERSION_MAJOR > 0u, "the declarations are openkal 0.17 or later");
check(kal_version() >= KAL_VERSION, "the implementation is at least as new as the declarations");

probe q{0, 0};
Expand All @@ -60,6 +63,30 @@ int main() {
kal_fs_remove(root, "okt.d", 5);
}

{
char system[32];
const kal_intptr n = kal_env_system(system, sizeof system);
check(n > 0, "the system this program runs upon is named");
}
{
kal_process me{};
kal_program_info info{};
info.self_size = sizeof info;
check(kal_process_self(&me) == kal_ok && kal_process_info(me, KAL_PINFO_ALL, &info) == kal_ok
&& info.id != 0 && info.started_ns != 0 && info.ended == 0,
"this program names itself, with the moment it started");
if (me.h) kal_process_close(me);
}
if (root.h && (kal_fs_props(root) & KAL_FS_PROP_RENAME_NO_REPLACE) != 0) {
kal_file f{};
if (kal_fs_open(root, "okt.a", 5, KAL_OPEN_WRITE | KAL_OPEN_CREATE | KAL_OPEN_TRUNCATE, &f) == kal_ok) kal_fs_close_file(f);
if (kal_fs_open(root, "okt.b", 5, KAL_OPEN_WRITE | KAL_OPEN_CREATE | KAL_OPEN_TRUNCATE, &f) == kal_ok) kal_fs_close_file(f);
check(kal_fs_rename_flags(root, "okt.a", 5, root, "okt.b", 5, KAL_RENAME_NO_REPLACE) == kal_err_exists,
"a rename that does not replace refuses a name that is taken");
kal_fs_remove(root, "okt.a", 5);
kal_fs_remove(root, "okt.b", 5);
}

if (failures == 0) kal_stream_write(kal_stdout(), "openkal: held\n", 14);
return failures == 0 ? 0 : 1;
}
4 changes: 2 additions & 2 deletions tests/openkal/pins.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ toolchain = "llvm@22.1.8"
# index requires mcpp >= 2026.9.18.1 but this is mcpp 2026.9.17.3 [E0006]"
# before a single line of the member's own source is read.
#
# 2026-10-24: measurement engine updated to 2026.10.24.1; runtime and
# 2026-10-26: measurement engine 2026.10.26.1, the workflow's. 2026-10-24: measurement engine updated to 2026.10.24.1; runtime and
# toolchain pins below remain unchanged. The index client floor is unchanged.
#
# 2026-09-26 (fourth move): `runtime` -> 0.15.2 and `mcpp` -> 2026.10.21.1,
Expand Down Expand Up @@ -139,7 +139,7 @@ toolchain = "llvm@22.1.8"
# openkal-musl 0.16.0 and openkal-llvm-runtime 0.12.0), because a pin that
# moves onto an unreachable or divergent asset fails every member at once and
# reports it as a compatibility result.
mcpp = "2026.10.24.1"
mcpp = "2026.10.26.1"

# The Windows target is named for the C environment the graph presents there,
# which is musl's (openkal-musl declares `[c-abi] presents = "posix"`), not
Expand Down
Loading