diff --git a/mcpp.toml b/mcpp.toml index d306eda2..9a510bcb 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -224,6 +224,7 @@ members = [ "tests/examples/openkal", "tests/examples/openkal-musl", "tests/examples/compiler-rt-builtins", + "tests/examples/openkal-tools", ] # ── The index redirect, hoisted to the workspace root ─────────────────── diff --git a/pkgs/o/openkal-ld.lua b/pkgs/o/openkal-ld.lua new file mode 100644 index 00000000..19b08dfb --- /dev/null +++ b/pkgs/o/openkal-ld.lua @@ -0,0 +1,50 @@ +-- openkal-ld --- libokld, the ok format's library (openkal SPEC clause 12). +-- +-- One of the three packages of mcpplibs/openkal-image, which share one tag +-- and one archive; each descriptor names its member's manifest. Freestanding: +-- the definition of the format, a reader, a checker, a signer and a loader, for +-- a loader (openkal-run), the tools (openkal-tools) and a C library that +-- loads an image beside itself (openkal-musl's dlopen in an ok image). +-- +-- No `deps'. The package names nothing beneath it. +package = { + spec = "1", + namespace = "mcpplibs", + name = "openkal-ld", + description = "libokld: the ok format (openkal image format) --- its definition, a reader of bytes, a checker, a signer, and a loader. Freestanding: no C library, no exceptions", + licenses = {"Apache-2.0"}, + repo = "https://github.com/mcpplibs/openkal-image", + type = "package", + + xpm = { + linux = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + macosx = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + windows = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + }, + + mcpp = "*/ld/mcpp.toml", +} diff --git a/pkgs/o/openkal-llvm-runtime.lua b/pkgs/o/openkal-llvm-runtime.lua index 3381f194..300492a2 100644 --- a/pkgs/o/openkal-llvm-runtime.lua +++ b/pkgs/o/openkal-llvm-runtime.lua @@ -75,6 +75,13 @@ package = { xpm = { linux = { + ["0.16.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.0/openkal-llvm-runtime-0.16.0.tar.gz", + }, + sha256 = "bd0ad0997f9b5639c8298f4947485a6959a954b0da49e346c0dd4562420bf352", + }, ["0.15.6"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.15.6.tar.gz", @@ -301,6 +308,13 @@ package = { }, }, macosx = { + ["0.16.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.0/openkal-llvm-runtime-0.16.0.tar.gz", + }, + sha256 = "bd0ad0997f9b5639c8298f4947485a6959a954b0da49e346c0dd4562420bf352", + }, ["0.15.6"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.15.6.tar.gz", @@ -527,6 +541,13 @@ package = { }, }, windows = { + ["0.16.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.0/openkal-llvm-runtime-0.16.0.tar.gz", + }, + sha256 = "bd0ad0997f9b5639c8298f4947485a6959a954b0da49e346c0dd4562420bf352", + }, ["0.15.6"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.15.6.tar.gz", diff --git a/pkgs/o/openkal-musl.lua b/pkgs/o/openkal-musl.lua index 699d4a34..dd290dea 100644 --- a/pkgs/o/openkal-musl.lua +++ b/pkgs/o/openkal-musl.lua @@ -64,6 +64,13 @@ package = { xpm = { linux = { + ["0.22.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.0/openkal-musl-0.22.0.tar.gz", + }, + sha256 = "28779cba8bd509b9aa4360f6918b0bab28e594a188d69c808ba00f692454f892", + }, ["0.21.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.21.1.tar.gz", @@ -304,6 +311,13 @@ package = { }, }, macosx = { + ["0.22.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.0/openkal-musl-0.22.0.tar.gz", + }, + sha256 = "28779cba8bd509b9aa4360f6918b0bab28e594a188d69c808ba00f692454f892", + }, ["0.21.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.21.1.tar.gz", @@ -544,6 +558,13 @@ package = { }, }, windows = { + ["0.22.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.0/openkal-musl-0.22.0.tar.gz", + }, + sha256 = "28779cba8bd509b9aa4360f6918b0bab28e594a188d69c808ba00f692454f892", + }, ["0.21.1"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.21.1.tar.gz", diff --git a/pkgs/o/openkal-run.lua b/pkgs/o/openkal-run.lua new file mode 100644 index 00000000..d4dc474e --- /dev/null +++ b/pkgs/o/openkal-run.lua @@ -0,0 +1,50 @@ +-- openkal-run --- libokrun, the runner of ok images (openkal SPEC clause 12). +-- +-- A member of mcpplibs/openkal-image (one tag, one archive). It maps an image +-- with libokld and binds what the image imports to the implementation of +-- openkal for the system it is built for, which its own manifest names under +-- `[target..dependencies]`. `okrun` is built from it, and so is a program +-- that carries an image as a section (`mcpp pack --mode self-contained`, M3). +-- +-- No `deps'. The package names openkal, openkal-ld and the implementation. +package = { + spec = "1", + namespace = "mcpplibs", + name = "openkal-run", + description = "libokrun: the runner of ok images over this system's openkal implementation --- it maps an image with libokld and binds the kal_* names it imports to this process's implementation", + licenses = {"Apache-2.0"}, + repo = "https://github.com/mcpplibs/openkal-image", + type = "package", + + xpm = { + linux = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + macosx = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + windows = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + }, + + mcpp = "*/run/mcpp.toml", +} diff --git a/pkgs/o/openkal-tools.lua b/pkgs/o/openkal-tools.lua new file mode 100644 index 00000000..03c980c2 --- /dev/null +++ b/pkgs/o/openkal-tools.lua @@ -0,0 +1,52 @@ +-- openkal-tools --- okrun and okld (openkal SPEC clause 12). +-- +-- A member of mcpplibs/openkal-image (one tag, one archive). A project that +-- builds ok images (`-openkal`) declares it for this machine: +-- +-- [build-dependencies] +-- openkal-tools = { version = "0.1.0", tools = ["okld", "okrun"] } +-- +-- mcpp finishes each image with okld and runs it with okrun. +-- +-- No `deps'. The package names openkal-run and openkal-ld. +package = { + spec = "1", + namespace = "mcpplibs", + name = "openkal-tools", + description = "okrun and okld: the runner of ok images, and the tool that writes an image's requirements note, checks the convention and signs it", + licenses = {"Apache-2.0"}, + repo = "https://github.com/mcpplibs/openkal-image", + type = "package", + + xpm = { + linux = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + macosx = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + windows = { + ["0.1.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.0/openkal-image-0.1.0.tar.gz", + }, + sha256 = "50d79f5a2ba9404e533693527b93a0e2e76f250840939b64bf2ea97a21cb414b", + }, + }, + }, + + mcpp = "*/tools/mcpp.toml", +} diff --git a/tests/examples/openkal-musl/mcpp.toml b/tests/examples/openkal-musl/mcpp.toml index 4b438701..8c5fe7fe 100644 --- a/tests/examples/openkal-musl/mcpp.toml +++ b/tests/examples/openkal-musl/mcpp.toml @@ -8,7 +8,7 @@ name = "openkal-musl-tests" version = "0.1.0" [target.'cfg(os = "linux")'.dependencies.mcpplibs] -openkal-musl = "0.21.1" +openkal-musl = "0.22.0" [target.'cfg(os = "linux")'.build] cxxflags = ["-DHAVE_OPENKAL_MUSL=1"] diff --git a/tests/examples/openkal-tools/mcpp.toml b/tests/examples/openkal-tools/mcpp.toml new file mode 100644 index 00000000..4c3cf9ef --- /dev/null +++ b/tests/examples/openkal-tools/mcpp.toml @@ -0,0 +1,15 @@ +# openkal-tools test project: okrun and okld, built for this machine as a +# project that makes ok images declares them, on every runner. The build of +# the tools is the observation (openkal-tools over openkal-run over openkal-ld +# and this system's openkal implementation, from one archive); the program +# names where mcpp put them. Images themselves are built and run by +# mcpplibs/openkal-image's own CI and by mcpp's (e2e 942). +[package] +name = "openkal-tools-tests" +version = "0.1.0" + +[build-dependencies.mcpplibs] +openkal-tools = { version = "0.1.0", tools = ["okld", "okrun"] } + +[indices] +mcpplibs = { path = "../../.." } diff --git a/tests/examples/openkal-tools/tests/tools.cpp b/tests/examples/openkal-tools/tests/tools.cpp new file mode 100644 index 00000000..4ba469e5 --- /dev/null +++ b/tests/examples/openkal-tools/tests/tools.cpp @@ -0,0 +1,7 @@ +// The tools a project that makes ok images declares are built for this machine. +import std; + +int main() { + std::println("openkal-tools-tests: okld and okrun were built for this machine"); + return 0; +} diff --git a/tests/examples/openkal/mcpp.toml b/tests/examples/openkal/mcpp.toml index a1c61147..ea8d26ab 100644 --- a/tests/examples/openkal/mcpp.toml +++ b/tests/examples/openkal/mcpp.toml @@ -30,7 +30,7 @@ openkal-macos = "0.15.0" openkal-windows = "0.13.0" [target.'cfg(all(os = "linux", env = "musl"))'.dependencies.mcpplibs] -openkal-llvm-runtime = "0.15.6" +openkal-llvm-runtime = "0.16.0" [target.'cfg(arch = "wasm32")'.dependencies.mcpplibs] openkal-emscripten = "0.5.0"