Skip to content

Commit cee6dd4

Browse files
feat: openarch 0.1.0 —— arch 机制层的 A0 探针 (#227)
* feat: openarch 0.1.0 —— arch 机制层的 A0 探针 ⚠️ **0.1.0 是探针不是层。** 一个架构,以及决定这一层能否成立的两个原语中的一个 (上下文切换)。 门 —— 一份接口在第二台**真正不同**的机器上不碎 —— 没有通过,而且一个架构通不过它: 只有一个 arch 时,抽象没有可以碎裂的对象。aarch64 缺 mcpp 目标表行与模拟器。 收录是为了探针可被消费与复现,不是因为这一层可以被建构其上。README 的 「未被证明的」一节逐项写明了状态。 * feat: std-freestanding-nolibc 0.1.1 —— 更正一条被实测推翻的断言 0.1.0 的注释、README 与本描述符都写着「与 C 库并存会重复定义而失败」。**实测:不会。** C 库以归档形式发布,归档成员只在符号仍未定义时才被拉入;本包的目标文件无条件进入 链接,于是先定义了 memcpy,C 库的成员从不被拉入,构建成功 —— 静默地把逐字节实现 换掉了 C 库经过优化的那份。**这比预测的报错更糟。** ⚠️ 0.1.0 保留且**内容不变**:发布过的版本就是可能有人 pin 过的版本。更正期间我一度 移动了 0.1.0 的 tag,随即回滚,并已核验其 tarball 的 sha256 与索引记录逐字节一致。 --------- Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent dae86ef commit cee6dd4

2 files changed

Lines changed: 87 additions & 0 deletions

File tree

pkgs/o/openarch.lua

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
-- openarch — the architecture-mechanism layer.
2+
--
3+
-- Form A because mcpp looks for a package manifest at the package ROOT, and
4+
-- Form B would leave it one level down inside the tarball's wrap directory.
5+
--
6+
-- ⚠️ NO `deps`. This package needs nothing installed: it is C++ modules plus
7+
-- per-architecture assembly, and which assembly is compiled follows the
8+
-- resolved target through the manifest's own `cfg(arch = ...)` sections.
9+
--
10+
-- ⚠️ 0.1.0 IS A PROBE, NOT A LAYER. One architecture and one of the two
11+
-- primitives that decide whether the layer can exist. The gate — that a single
12+
-- interface survives a second, genuinely different machine — has not been
13+
-- passed and cannot be passed by one architecture. Listed so that the probe can
14+
-- be consumed and reproduced, not because the layer is ready to be built upon.
15+
package = {
16+
spec = "1",
17+
namespace = "mcpplibs",
18+
name = "openarch",
19+
description = "openarch: the architecture-mechanism layer — execution contexts, traps and address spaces, as one interface over several instruction sets",
20+
licenses = {"Apache-2.0"},
21+
repo = "https://github.com/mcpplibs/openarch",
22+
type = "package",
23+
24+
xpm = {
25+
linux = {
26+
["0.1.0"] = {
27+
url = {
28+
GLOBAL = "https://github.com/mcpplibs/openarch/archive/refs/tags/0.1.0.tar.gz",
29+
CN = "https://gitcode.com/mcpp-res/openarch/releases/download/0.1.0/openarch-0.1.0.tar.gz",
30+
},
31+
sha256 = "9f1799c66eb5b96fe1cfe09c6d534d26b61fed14c985e9fa4ce788cd0ecb0e65",
32+
},
33+
},
34+
macosx = {
35+
["0.1.0"] = {
36+
url = {
37+
GLOBAL = "https://github.com/mcpplibs/openarch/archive/refs/tags/0.1.0.tar.gz",
38+
CN = "https://gitcode.com/mcpp-res/openarch/releases/download/0.1.0/openarch-0.1.0.tar.gz",
39+
},
40+
sha256 = "9f1799c66eb5b96fe1cfe09c6d534d26b61fed14c985e9fa4ce788cd0ecb0e65",
41+
},
42+
},
43+
windows = {
44+
["0.1.0"] = {
45+
url = {
46+
GLOBAL = "https://github.com/mcpplibs/openarch/archive/refs/tags/0.1.0.tar.gz",
47+
CN = "https://gitcode.com/mcpp-res/openarch/releases/download/0.1.0/openarch-0.1.0.tar.gz",
48+
},
49+
sha256 = "9f1799c66eb5b96fe1cfe09c6d534d26b61fed14c985e9fa4ce788cd0ecb0e65",
50+
},
51+
},
52+
},
53+
54+
-- The package's own manifest, inside the tarball's wrap directory.
55+
mcpp = "*/mcpp.toml",
56+
}

pkgs/s/std-freestanding-nolibc.lua

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
-- Four of the five are an obligation rather than a convenience: a freestanding
1010
-- implementation provides memcpy, memmove, memset and memcmp because the
1111
-- compiler lowers structure assignment and array initialisation onto them.
12+
--
13+
-- ⚠️ 0.1.1 corrects a claim, not code. 0.1.0 predicted that using this package
14+
-- alongside a C library would fail with a duplicate definition. Measured: it
15+
-- does not. A C library is an ARCHIVE, and an archive member is pulled only
16+
-- while the symbol is still undefined, so this package's object files define
17+
-- `memcpy` first and the C library's member is never pulled. The build
18+
-- succeeds, silently substituting byte-at-a-time implementations for the C
19+
-- library's optimised ones — which is worse than the error that was predicted.
20+
-- 0.1.0 stays listed because a published version is one somebody may have
21+
-- pinned.
1222
package = {
1323
spec = "1",
1424
namespace = "mcpplibs",
@@ -27,6 +37,13 @@ package = {
2737
},
2838
sha256 = "280ffe0180e0bd19ef94d4655c564507c4799e5c72ac7624d58722cb8aac363a",
2939
},
40+
["0.1.1"] = {
41+
url = {
42+
GLOBAL = "https://github.com/mcpplibs/std-freestanding-nolibc/archive/refs/tags/0.1.1.tar.gz",
43+
CN = "https://gitcode.com/mcpp-res/std-freestanding-nolibc/releases/download/0.1.1/std-freestanding-nolibc-0.1.1.tar.gz",
44+
},
45+
sha256 = "8999ec9db31699569e14a9c5f0fa24f4736961b1d8aec143c4d0cc7e5a978ec0",
46+
},
3047
},
3148
macosx = {
3249
["0.1.0"] = {
@@ -36,6 +53,13 @@ package = {
3653
},
3754
sha256 = "280ffe0180e0bd19ef94d4655c564507c4799e5c72ac7624d58722cb8aac363a",
3855
},
56+
["0.1.1"] = {
57+
url = {
58+
GLOBAL = "https://github.com/mcpplibs/std-freestanding-nolibc/archive/refs/tags/0.1.1.tar.gz",
59+
CN = "https://gitcode.com/mcpp-res/std-freestanding-nolibc/releases/download/0.1.1/std-freestanding-nolibc-0.1.1.tar.gz",
60+
},
61+
sha256 = "8999ec9db31699569e14a9c5f0fa24f4736961b1d8aec143c4d0cc7e5a978ec0",
62+
},
3963
},
4064
windows = {
4165
["0.1.0"] = {
@@ -45,6 +69,13 @@ package = {
4569
},
4670
sha256 = "280ffe0180e0bd19ef94d4655c564507c4799e5c72ac7624d58722cb8aac363a",
4771
},
72+
["0.1.1"] = {
73+
url = {
74+
GLOBAL = "https://github.com/mcpplibs/std-freestanding-nolibc/archive/refs/tags/0.1.1.tar.gz",
75+
CN = "https://gitcode.com/mcpp-res/std-freestanding-nolibc/releases/download/0.1.1/std-freestanding-nolibc-0.1.1.tar.gz",
76+
},
77+
sha256 = "8999ec9db31699569e14a9c5f0fa24f4736961b1d8aec143c4d0cc7e5a978ec0",
78+
},
4879
},
4980
},
5081

0 commit comments

Comments
 (0)