diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b9159a1..514605a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ ### Added +- **openkal 0.22.0;openkal-linux 0.23.0、openkal-macos 0.20.0、openkal-windows 0.18.0、openkal-emscripten 0.11.0。** + `openkal.process` 的位置上的空设备:`KAL_SPAWN_NULL_IN`、`_OUT`、`_ERR` 使启动的程序在该位置读到输入结束、写入全部被接受并 + 丢弃(属性 `KAL_PROCESS_PROP_NULL_STREAMS`);Linux、macOS 在启动的程序一侧打开 `/dev/null`,Windows 为本次启动打开 `NUL`。 + openkal-emscripten 依 0.22 编写,无其他改动。测试成员 `openkal` 随之移动,并观察标志与流同处一个位置时被拒绝。GLOBAL 为 + GitHub 标签归档,CN 为 GitCode `mcpp-res` 镜像,sha256 两处一致。 - **openkal-platform 0.21.1。** 版本组改为 openkal-image 0.3.1(记住的 okb 准入不再读取成员)、openkal-musl 0.26.1、 openkal-llvm-runtime 0.17.1,carrier 为 openkal-run 0.3.1;其余与 0.21.0 相同。GLOBAL 为 GitHub 标签归档,CN 为 GitCode `mcpp-res` 镜像,sha256 两处一致。 diff --git a/pkgs/o/openkal-emscripten.lua b/pkgs/o/openkal-emscripten.lua index 1718ff07..b9cd791e 100644 --- a/pkgs/o/openkal-emscripten.lua +++ b/pkgs/o/openkal-emscripten.lua @@ -46,6 +46,13 @@ package = { xpm = { linux = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-emscripten/archive/refs/tags/0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-emscripten/releases/download/0.11.0/openkal-emscripten-0.11.0.tar.gz", + }, + sha256 = "040dedc1455c450031d68aa8164598ab2c0b63c22dcf38ffffc3683036c13c72", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-emscripten/archive/refs/tags/0.10.0.tar.gz", @@ -132,6 +139,13 @@ package = { }, }, macosx = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-emscripten/archive/refs/tags/0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-emscripten/releases/download/0.11.0/openkal-emscripten-0.11.0.tar.gz", + }, + sha256 = "040dedc1455c450031d68aa8164598ab2c0b63c22dcf38ffffc3683036c13c72", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-emscripten/archive/refs/tags/0.10.0.tar.gz", @@ -218,6 +232,13 @@ package = { }, }, windows = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-emscripten/archive/refs/tags/0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-emscripten/releases/download/0.11.0/openkal-emscripten-0.11.0.tar.gz", + }, + sha256 = "040dedc1455c450031d68aa8164598ab2c0b63c22dcf38ffffc3683036c13c72", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-emscripten/archive/refs/tags/0.10.0.tar.gz", diff --git a/pkgs/o/openkal-linux.lua b/pkgs/o/openkal-linux.lua index 1ae83bb2..84c4dc61 100644 --- a/pkgs/o/openkal-linux.lua +++ b/pkgs/o/openkal-linux.lua @@ -19,6 +19,13 @@ package = { xpm = { linux = { + ["0.23.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.23.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.23.0/openkal-linux-0.23.0.tar.gz", + }, + sha256 = "fd7a2448349f3f5169f427998b6e288d89505e196bc94c182323da5c8b5354ca", + }, ["0.22.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.22.0.tar.gz", @@ -210,6 +217,13 @@ package = { }, }, macosx = { + ["0.23.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.23.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.23.0/openkal-linux-0.23.0.tar.gz", + }, + sha256 = "fd7a2448349f3f5169f427998b6e288d89505e196bc94c182323da5c8b5354ca", + }, ["0.22.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.22.0.tar.gz", @@ -401,6 +415,13 @@ package = { }, }, windows = { + ["0.23.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.23.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-linux/releases/download/0.23.0/openkal-linux-0.23.0.tar.gz", + }, + sha256 = "fd7a2448349f3f5169f427998b6e288d89505e196bc94c182323da5c8b5354ca", + }, ["0.22.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-linux/archive/refs/tags/0.22.0.tar.gz", diff --git a/pkgs/o/openkal-macos.lua b/pkgs/o/openkal-macos.lua index b97d0098..487b3437 100644 --- a/pkgs/o/openkal-macos.lua +++ b/pkgs/o/openkal-macos.lua @@ -19,6 +19,13 @@ package = { xpm = { linux = { + ["0.20.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.20.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.20.0/openkal-macos-0.20.0.tar.gz", + }, + sha256 = "109eb37bca90a121315dab5c697ceafa8be4ee91958894691b82b57a45a827c4", + }, ["0.19.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.19.0.tar.gz", @@ -210,6 +217,13 @@ package = { }, }, macosx = { + ["0.20.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.20.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.20.0/openkal-macos-0.20.0.tar.gz", + }, + sha256 = "109eb37bca90a121315dab5c697ceafa8be4ee91958894691b82b57a45a827c4", + }, ["0.19.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.19.0.tar.gz", @@ -401,6 +415,13 @@ package = { }, }, windows = { + ["0.20.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.20.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-macos/releases/download/0.20.0/openkal-macos-0.20.0.tar.gz", + }, + sha256 = "109eb37bca90a121315dab5c697ceafa8be4ee91958894691b82b57a45a827c4", + }, ["0.19.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-macos/archive/refs/tags/0.19.0.tar.gz", diff --git a/pkgs/o/openkal-windows.lua b/pkgs/o/openkal-windows.lua index 085a3e23..4ba43df3 100644 --- a/pkgs/o/openkal-windows.lua +++ b/pkgs/o/openkal-windows.lua @@ -21,6 +21,13 @@ package = { xpm = { linux = { + ["0.18.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.18.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.18.0/openkal-windows-0.18.0.tar.gz", + }, + sha256 = "5d3d849ea59c8c02b0f1bb3f5c07ce8bfb0d764f1919fada42986cfb6e370a96", + }, ["0.17.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.17.0.tar.gz", @@ -233,6 +240,13 @@ package = { }, }, macosx = { + ["0.18.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.18.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.18.0/openkal-windows-0.18.0.tar.gz", + }, + sha256 = "5d3d849ea59c8c02b0f1bb3f5c07ce8bfb0d764f1919fada42986cfb6e370a96", + }, ["0.17.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.17.0.tar.gz", @@ -445,6 +459,13 @@ package = { }, }, windows = { + ["0.18.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.18.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal-windows/releases/download/0.18.0/openkal-windows-0.18.0.tar.gz", + }, + sha256 = "5d3d849ea59c8c02b0f1bb3f5c07ce8bfb0d764f1919fada42986cfb6e370a96", + }, ["0.17.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal-windows/archive/refs/tags/0.17.0.tar.gz", diff --git a/pkgs/o/openkal.lua b/pkgs/o/openkal.lua index 575b2ea9..c15514e9 100644 --- a/pkgs/o/openkal.lua +++ b/pkgs/o/openkal.lua @@ -22,6 +22,13 @@ package = { xpm = { linux = { + ["0.22.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.22.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.22.0/openkal-0.22.0.tar.gz", + }, + sha256 = "ca5ecbd31d4f3041766c818430b1c67087c9bd871f2fbcf7537825ec48e0a9b6", + }, ["0.21.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.21.0.tar.gz", @@ -171,6 +178,13 @@ package = { }, }, macosx = { + ["0.22.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.22.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.22.0/openkal-0.22.0.tar.gz", + }, + sha256 = "ca5ecbd31d4f3041766c818430b1c67087c9bd871f2fbcf7537825ec48e0a9b6", + }, ["0.21.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.21.0.tar.gz", @@ -320,6 +334,13 @@ package = { }, }, windows = { + ["0.22.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.22.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/openkal/releases/download/0.22.0/openkal-0.22.0.tar.gz", + }, + sha256 = "ca5ecbd31d4f3041766c818430b1c67087c9bd871f2fbcf7537825ec48e0a9b6", + }, ["0.21.0"] = { url = { GLOBAL = "https://github.com/mcpplibs/openkal/archive/refs/tags/0.21.0.tar.gz", diff --git a/tests/examples/openkal/mcpp.toml b/tests/examples/openkal/mcpp.toml index 8e1919dc..3d4fb808 100644 --- a/tests/examples/openkal/mcpp.toml +++ b/tests/examples/openkal/mcpp.toml @@ -18,22 +18,22 @@ name = "openkal-tests" version = "0.1.0" [dependencies.mcpplibs] -openkal = "0.21.0" +openkal = "0.22.0" [target.'cfg(os = "linux")'.dependencies.mcpplibs] -openkal-linux = "0.22.0" +openkal-linux = "0.23.0" [target.'cfg(os = "macos")'.dependencies.mcpplibs] -openkal-macos = "0.19.0" +openkal-macos = "0.20.0" [target.'cfg(windows)'.dependencies.mcpplibs] -openkal-windows = "0.17.0" +openkal-windows = "0.18.0" [target.'cfg(all(os = "linux", env = "musl"))'.dependencies.mcpplibs] openkal-llvm-runtime = "0.17.1" [target.'cfg(arch = "wasm32")'.dependencies.mcpplibs] -openkal-emscripten = "0.10.0" +openkal-emscripten = "0.11.0" [target.'cfg(arch = "riscv64")'.dependencies.mcpplibs] openkal-opensbi = "0.8.3" diff --git a/tests/examples/openkal/tests/kal.cpp b/tests/examples/openkal/tests/kal.cpp index 4ef42bdc..cdfbb37d 100644 --- a/tests/examples/openkal/tests/kal.cpp +++ b/tests/examples/openkal/tests/kal.cpp @@ -13,7 +13,9 @@ // this program is told the memory it occupies and its peak, and a region is // reserved, backed, written, its backing returned and backed again reading // zero, and released; (0.21) where the implementation states it, part of an -// executable region is a file's bytes, read from where the file holds them. +// executable region is a file's bytes, read from where the file holds them; +// (0.22) the null device beside a stream at one position is refused, and is +// refused as unsupported where the implementation does not state it. // The terminal is not observed here, // because a test run has none; the implementations observe it on a terminal // they make. @@ -118,6 +120,29 @@ int main() { "a joined command line is refused where programs receive vectors"); } + if (root.h) { + const char* argv[] = { "x" }; + const kal_uintptr lens[] = { 1 }; + kal_process p{}; + if ((kal_process_props() & KAL_PROCESS_PROP_NULL_STREAMS) == 0) { + const kal_spawn how{ root, root, nullptr, nullptr, 0, KAL_SPAWN_NULL_OUT }; + check(kal_process_spawn(&how, "x", 1, argv, lens, 1, nullptr, nullptr, 0, nullptr, &p) + == kal_err_not_supported, + "the null device is refused where the implementation does not state it"); + } else if (kal_process_props() & KAL_PROCESS_PROP_CHANNEL) { + kal_stream mine{}, theirs{}; + if (kal_process_channel(&mine, &theirs) == kal_ok) { + const kal_spawn_streams placed{ kal_stream{0}, theirs, kal_stream{0} }; + const kal_spawn how{ root, root, nullptr, nullptr, 0, KAL_SPAWN_NULL_OUT }; + check(kal_process_spawn(&how, "x", 1, argv, lens, 1, nullptr, nullptr, 0, &placed, &p) + == kal_err_invalid, + "the null device beside a stream at one position is refused"); + kal_process_channel_close(theirs); + kal_process_channel_close(mine); + } + } + } + if (root.h && (kal_interfaces() & KAL_IFACE_MAP) != 0) { kal_file f{}; if (kal_fs_open(root, "okt.m", 5, KAL_OPEN_READ | KAL_OPEN_WRITE | KAL_OPEN_CREATE | KAL_OPEN_TRUNCATE, &f) == kal_ok) {