Skip to content

Commit 67d220b

Browse files
authored
mcpplibs.os 0.2.2: Emscripten (wasm32-emscripten) (#619)
Adds mcpplibs.os 0.2.2 (mcpplibs/os#9; tag 0.2.2 on 2b46d9f): the wasm32-emscripten target over Emscripten's C library and openkal-emscripten 0.6.0; fs::read without a 64 KiB stack array; stamp_of / identity_of ask for the kind. GLOBAL is the GitHub tag archive, CN the byte-identical GitCode mcpp-res/os asset (sha256 33c5d946...4e3e). Member tests/examples/os moves to 0.2.2.
1 parent b11d654 commit 67d220b

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
### Added
1111

12+
- **mcpplibs.os 0.2.2。** 新增 `wasm32-emscripten` 目标:基于 Emscripten 的 C 库与 openkal-emscripten 0.6.0 的 wasm
13+
模块,在 node 或页面中运行;新增 `platform::emscripten`、`architecture::wasm32` 与 `is_emscripten`,不定义平台模块。
14+
openkal-emscripten 没有 `openkal.process`,启动程序的调用在链接时失败并给出 openkal 符号名;`interrupt` 报告不会收到
15+
结束请求。修正(所有目标):`fs::read` 不再经栈上 64 KiB 数组读取(它占满了 wasm 模块的默认栈);`stamp_of` 与
16+
`identity_of` 同时请求节点种类,不再把已有文件报告为不存在。GLOBAL 为 GitHub 标签归档,CN 为 GitCode `mcpp-res/os`
17+
镜像,sha256 一致。测试成员 `os` 移到 0.2.2。
1218
- **mcpplibs.openkal-emscripten 0.6.0。** 按 openkal 0.17.1 实现其提供的十二个接口,使依赖 openkal 0.17 的
1319
mcpplibs.os 能在 `wasm32-emscripten` 上解析与链接。`kal_env_image` 为 node 所给的脚本(页面中为 `kal_err_not_found`),
1420
`kal_env_loader` 为 `kal_err_not_found`,`kal_env_system` 为 `emscripten`;`kal_fs_rename_flags` 中

‎pkgs/o/os.lua‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
-- C library, C++ run-time and loader are its platform's (openkal-platform,
1111
-- which mcpp 2026.10.27.1 selects for `<arch>-openkal'), and the package
1212
-- declares none of them.
13+
-- From 0.2.2 it builds for `wasm32-emscripten' over Emscripten's C library and
14+
-- openkal-emscripten 0.6.0, which its manifest names for that target; starting
15+
-- a program there fails at link, naming the openkal symbol.
1316
package = {
1417
spec = "1",
1518
namespace = "mcpplibs",
@@ -28,6 +31,13 @@ package = {
2831

2932
xpm = {
3033
linux = {
34+
["0.2.2"] = {
35+
url = {
36+
GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.2.2.tar.gz",
37+
CN = "https://gitcode.com/mcpp-res/os/releases/download/0.2.2/os-0.2.2.tar.gz",
38+
},
39+
sha256 = "33c5d946c29de1ba7bacabe40fe6ee2f60bea0b25e62c0359f8c570b0f654e3e",
40+
},
3141
["0.2.1"] = {
3242
url = {
3343
GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.2.1.tar.gz",
@@ -56,6 +66,13 @@ package = {
5666
},
5767
},
5868
macosx = {
69+
["0.2.2"] = {
70+
url = {
71+
GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.2.2.tar.gz",
72+
CN = "https://gitcode.com/mcpp-res/os/releases/download/0.2.2/os-0.2.2.tar.gz",
73+
},
74+
sha256 = "33c5d946c29de1ba7bacabe40fe6ee2f60bea0b25e62c0359f8c570b0f654e3e",
75+
},
5976
["0.2.1"] = {
6077
url = {
6178
GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.2.1.tar.gz",
@@ -84,6 +101,13 @@ package = {
84101
},
85102
},
86103
windows = {
104+
["0.2.2"] = {
105+
url = {
106+
GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.2.2.tar.gz",
107+
CN = "https://gitcode.com/mcpp-res/os/releases/download/0.2.2/os-0.2.2.tar.gz",
108+
},
109+
sha256 = "33c5d946c29de1ba7bacabe40fe6ee2f60bea0b25e62c0359f8c570b0f654e3e",
110+
},
87111
["0.2.1"] = {
88112
url = {
89113
GLOBAL = "https://github.com/mcpplibs/os/archive/refs/tags/0.2.1.tar.gz",

‎tests/examples/os/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "os-tests"
77
version = "0.1.0"
88

99
[dependencies.mcpplibs]
10-
os = "0.2.1"
10+
os = "0.2.2"
1111

1212
[indices]
1313
mcpplibs = { path = "../../.." }

0 commit comments

Comments
 (0)