Skip to content

Commit 9fa98cb

Browse files
openkal 0.17.2 round: openkal-ld, openkal-run, openkal-tools, openkal-bind 0.1.2; openkal-musl 0.22.4; openkal-llvm-runtime 0.16.4 (#598)
* openkal 0.17.2 round: openkal-ld, openkal-run, openkal-tools, openkal-bind 0.1.2; openkal-musl 0.22.4; openkal-llvm-runtime 0.16.4 - openkal-image 0.1.2: okb v1, okrun's bundle and library interfaces, and the new package openkal-bind (one tag, one archive) - openkal-musl 0.22.4: renameat2's flags done by their meaning or refused - openkal-llvm-runtime 0.16.4: openkal-musl 0.22.4 - new member openkal-bind (an image built in build.mcpp, bound by the plugin, called by the test and calling back); openkal, openkal-musl and openkal-tools move Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com> * openkal-bind member: the ELF linker is lld -flavor gnu where the payload has no ld.lld (Windows) Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com> * openkal-bind member: the ELF linker is whichever name of lld the payload ships, told its flavour Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com> --------- Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 6fb3ed0 commit 9fa98cb

16 files changed

Lines changed: 309 additions & 3 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@
3838
openkal-macos 0.15.1 与 openkal-windows 0.13.3,以 `KAL_SPAWN_ONE_STRING` 启动命令解释器的 image 在 okrun
3939
下得到该标志的语义;三个包仍为同一版本、同一归档。openkal-musl 随 openkal-windows 0.13.3 与 openkal-ld 0.1.1
4040
移动,openkal-llvm-runtime 随 openkal-musl 移动。测试成员 `openkal`、`openkal-musl`、`openkal-tools` 随之移动。
41+
- **openkal 0.17.2 这一轮:openkal-ld、openkal-run、openkal-tools 0.1.2,新包 openkal-bind 0.1.2,
42+
openkal-musl 0.22.4,openkal-llvm-runtime 0.16.4。** openkal-image 0.1.2 定义 okb v1(`docs/okb.md`):
43+
一个 ZIP 归档,映像以 stored 存放、数据起点按 64 KiB 对齐,`okb.json` 给出各架构的目录、入口与每个成员的
44+
sha256,`okb.sig` 对清单签名;`okld bundle` / `okld bundle check` 写出并校验它,okrun 运行它;libokrun
45+
增加 `okrun_run_okb_bytes`、`okrun_run_images`(从内存运行,不写盘)与 `okrun_open_library` /
46+
`okrun_symbol` / `okrun_close`。openkal-bind 是构建插件(模块 `mcpp.mcpplibs.openkal_bind`,
47+
`docs/bind.md`):以 `.okso` 加 C 头文件发布的库,在 Linux、macOS、Windows 上经它生成的绑定调用,
48+
边界(`long`、`wchar_t`、变参、无原型的回调、未导出的函数)在构建时拒绝。四个包同一标签、同一归档。
49+
openkal-musl 0.22.4 的 `renameat2` 按标志的含义执行或拒绝(`RENAME_NOREPLACE` 为
50+
`kal_fs_rename_flags`,`RENAME_EXCHANGE` 与其余标志为 `EINVAL`);此前不读标志,交换会丢失第二个文件。
51+
openkal-llvm-runtime 随 openkal-musl 移动。新增测试成员 `openkal-bind`(在构建程序中构建一个映像并经
52+
插件绑定,测试经绑定调用映像、映像回调测试程序);`openkal`、`openkal-musl`、`openkal-tools` 随之移动。
4153
- **mcpplibs.os 0.2.0。** mcpp 的操作系统层所承载的内容进入 os:`exec`(本进程成为另一个程序)、
4254
一个管道按写入顺序承载输出与错误输出、追加写与持久化、卷的容量、`place` 与 `exchange`、属主、
4355
处理器数与可用内存、有界读取输入、发往错误流的输出、保留中断的原始模式,以及 Windows 的事实。

‎mcpp.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ members = [
234234
"tests/examples/openkal-musl",
235235
"tests/examples/compiler-rt-builtins",
236236
"tests/examples/openkal-tools",
237+
"tests/examples/openkal-bind",
237238
"tests/examples/os",
238239
]
239240

‎pkgs/o/openkal-bind.lua‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
-- openkal-bind --- the build plugin `mcpp.mcpplibs.openkal_bind' (openkal-image
2+
-- docs/bind.md).
3+
--
4+
-- A member of mcpplibs/openkal-image from 0.1.2 (one tag, one archive). A
5+
-- library published as an ok image (`lib<name>.okso') and a C header calls it
6+
-- from its build.mcpp:
7+
--
8+
-- [build-dependencies]
9+
-- openkal-bind = "0.1.2"
10+
--
11+
-- On an openkal target the image is linked as it is; on Linux, macOS and
12+
-- Windows the plugin reads the header with clang, checks the boundary, and
13+
-- generates a binding that calls the image through libokrun (openkal-run).
14+
--
15+
-- No `deps'. The plugin names no package; the library that uses it names
16+
-- openkal-run, and the plugin's own `xim:llvm' payload is declared on request.
17+
package = {
18+
spec = "1",
19+
namespace = "mcpplibs",
20+
name = "openkal-bind",
21+
description = "A build plugin: a library published as an ok image (.okso) and a C header is called from a program of Linux, macOS or Windows, through a binding generated from the header and libokrun",
22+
licenses = {"Apache-2.0"},
23+
repo = "https://github.com/mcpplibs/openkal-image",
24+
type = "package",
25+
26+
xpm = {
27+
linux = {
28+
["0.1.2"] = {
29+
url = {
30+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
31+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
32+
},
33+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
34+
},
35+
},
36+
macosx = {
37+
["0.1.2"] = {
38+
url = {
39+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
40+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
41+
},
42+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
43+
},
44+
},
45+
windows = {
46+
["0.1.2"] = {
47+
url = {
48+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
49+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
50+
},
51+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
52+
},
53+
},
54+
},
55+
56+
mcpp = "*/bind/mcpp.toml",
57+
}

‎pkgs/o/openkal-ld.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ package = {
1818

1919
xpm = {
2020
linux = {
21+
["0.1.2"] = {
22+
url = {
23+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
24+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
25+
},
26+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
27+
},
2128
["0.1.1"] = {
2229
url = {
2330
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
@@ -34,6 +41,13 @@ package = {
3441
},
3542
},
3643
macosx = {
44+
["0.1.2"] = {
45+
url = {
46+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
47+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
48+
},
49+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
50+
},
3751
["0.1.1"] = {
3852
url = {
3953
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
@@ -50,6 +64,13 @@ package = {
5064
},
5165
},
5266
windows = {
67+
["0.1.2"] = {
68+
url = {
69+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
70+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
71+
},
72+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
73+
},
5374
["0.1.1"] = {
5475
url = {
5576
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",

‎pkgs/o/openkal-llvm-runtime.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ package = {
7575

7676
xpm = {
7777
linux = {
78+
["0.16.4"] = {
79+
url = {
80+
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.4.tar.gz",
81+
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.4/openkal-llvm-runtime-0.16.4.tar.gz",
82+
},
83+
sha256 = "f3ee0205871b18e1ad8efd619fc8b7ff196fdccebeca1e849a9d74f022dea8a7",
84+
},
7885
["0.16.3"] = {
7986
url = {
8087
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.3.tar.gz",
@@ -329,6 +336,13 @@ package = {
329336
},
330337
},
331338
macosx = {
339+
["0.16.4"] = {
340+
url = {
341+
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.4.tar.gz",
342+
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.4/openkal-llvm-runtime-0.16.4.tar.gz",
343+
},
344+
sha256 = "f3ee0205871b18e1ad8efd619fc8b7ff196fdccebeca1e849a9d74f022dea8a7",
345+
},
332346
["0.16.3"] = {
333347
url = {
334348
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.3.tar.gz",
@@ -583,6 +597,13 @@ package = {
583597
},
584598
},
585599
windows = {
600+
["0.16.4"] = {
601+
url = {
602+
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.4.tar.gz",
603+
CN = "https://gitcode.com/mcpp-res/openkal-llvm-runtime/releases/download/0.16.4/openkal-llvm-runtime-0.16.4.tar.gz",
604+
},
605+
sha256 = "f3ee0205871b18e1ad8efd619fc8b7ff196fdccebeca1e849a9d74f022dea8a7",
606+
},
586607
["0.16.3"] = {
587608
url = {
588609
GLOBAL = "https://github.com/mcpplibs/openkal-llvm-runtime/archive/refs/tags/0.16.3.tar.gz",

‎pkgs/o/openkal-musl.lua‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
-- (An earlier revision of this comment said 0.15.0 was pending and unlisted.
5454
-- It had been released and registered; a note claiming a published version
5555
-- does not exist reads as missing data rather than as a stale sentence.)
56+
--
57+
-- 0.22.4 reads the flags word of `renameat2': RENAME_NOREPLACE is
58+
-- `kal_fs_rename_flags(KAL_RENAME_NO_REPLACE)' and every other flag is EINVAL.
59+
-- Before it the word was not read, and a RENAME_EXCHANGE lost the second
60+
-- file. The image form pins openkal-ld 0.1.2.
5661
package = {
5762
spec = "1",
5863
namespace = "mcpplibs",
@@ -64,6 +69,13 @@ package = {
6469

6570
xpm = {
6671
linux = {
72+
["0.22.4"] = {
73+
url = {
74+
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.4.tar.gz",
75+
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.4/openkal-musl-0.22.4.tar.gz",
76+
},
77+
sha256 = "ee796a13882d4e4a1fb7829d72898eb865147e6d2b3b7c1a09c7f325b226cf68",
78+
},
6779
["0.22.3"] = {
6880
url = {
6981
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.3.tar.gz",
@@ -332,6 +344,13 @@ package = {
332344
},
333345
},
334346
macosx = {
347+
["0.22.4"] = {
348+
url = {
349+
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.4.tar.gz",
350+
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.4/openkal-musl-0.22.4.tar.gz",
351+
},
352+
sha256 = "ee796a13882d4e4a1fb7829d72898eb865147e6d2b3b7c1a09c7f325b226cf68",
353+
},
335354
["0.22.3"] = {
336355
url = {
337356
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.3.tar.gz",
@@ -600,6 +619,13 @@ package = {
600619
},
601620
},
602621
windows = {
622+
["0.22.4"] = {
623+
url = {
624+
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.4.tar.gz",
625+
CN = "https://gitcode.com/mcpp-res/openkal-musl/releases/download/0.22.4/openkal-musl-0.22.4.tar.gz",
626+
},
627+
sha256 = "ee796a13882d4e4a1fb7829d72898eb865147e6d2b3b7c1a09c7f325b226cf68",
628+
},
603629
["0.22.3"] = {
604630
url = {
605631
GLOBAL = "https://github.com/mcpplibs/openkal-musl/archive/refs/tags/0.22.3.tar.gz",

‎pkgs/o/openkal-run.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ package = {
1818

1919
xpm = {
2020
linux = {
21+
["0.1.2"] = {
22+
url = {
23+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
24+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
25+
},
26+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
27+
},
2128
["0.1.1"] = {
2229
url = {
2330
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
@@ -34,6 +41,13 @@ package = {
3441
},
3542
},
3643
macosx = {
44+
["0.1.2"] = {
45+
url = {
46+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
47+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
48+
},
49+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
50+
},
3751
["0.1.1"] = {
3852
url = {
3953
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
@@ -50,6 +64,13 @@ package = {
5064
},
5165
},
5266
windows = {
67+
["0.1.2"] = {
68+
url = {
69+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
70+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
71+
},
72+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
73+
},
5374
["0.1.1"] = {
5475
url = {
5576
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",

‎pkgs/o/openkal-tools.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ package = {
2020

2121
xpm = {
2222
linux = {
23+
["0.1.2"] = {
24+
url = {
25+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
26+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
27+
},
28+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
29+
},
2330
["0.1.1"] = {
2431
url = {
2532
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
@@ -36,6 +43,13 @@ package = {
3643
},
3744
},
3845
macosx = {
46+
["0.1.2"] = {
47+
url = {
48+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
49+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
50+
},
51+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
52+
},
3953
["0.1.1"] = {
4054
url = {
4155
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
@@ -52,6 +66,13 @@ package = {
5266
},
5367
},
5468
windows = {
69+
["0.1.2"] = {
70+
url = {
71+
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.2.tar.gz",
72+
CN = "https://gitcode.com/mcpp-res/openkal-image/releases/download/0.1.2/openkal-image-0.1.2.tar.gz",
73+
},
74+
sha256 = "63768571a800f3acdad420e18c14ee1bc5142f77ef29dcf01841f40d8f1f9a25",
75+
},
5576
["0.1.1"] = {
5677
url = {
5778
GLOBAL = "https://github.com/mcpplibs/openkal-image/archive/refs/tags/0.1.1.tar.gz",
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// The image this member binds is built here, from image/twice.c, as a library
2+
// published as an image is built anywhere: clang for <arch>-unknown-none-elf,
3+
// the notes `okld note-source' lays down, ld.lld, `okld note'. Then
4+
// openkal-bind reads include/twice.h and generates the binding.
5+
#include <cstdio>
6+
#include <cstdlib>
7+
import std;
8+
import mcpp;
9+
import mcpp.mcpplibs.openkal_bind;
10+
11+
namespace fs = std::filesystem;
12+
13+
namespace {
14+
bool windows() { return std::string_view(mcpp::host()).find("windows") != std::string_view::npos; }
15+
std::string q(const fs::path& p) { return "\"" + p.generic_string() + "\""; }
16+
int run(std::string cmd) {
17+
if (windows()) cmd = "\"" + cmd + "\"";
18+
std::fflush(stdout);
19+
return std::system(cmd.c_str());
20+
}
21+
}
22+
23+
int main() {
24+
const fs::path root = mcpp::manifest_dir();
25+
const fs::path llvm = mcpp::xpkg_dir("xim", "llvm");
26+
const fs::path okld = mcpp::dep_bin("openkal-tools", "okld");
27+
const std::string arch = mcpp::target_arch();
28+
const std::string exe = windows() ? ".exe" : "";
29+
if (llvm.empty() || okld.empty()) {
30+
std::fprintf(stderr, "error: openkal-bind-tests needs xim:llvm and openkal-tools' okld\n");
31+
return 1;
32+
}
33+
const fs::path out = fs::path(mcpp::out_dir()) / "lib" / arch;
34+
fs::create_directories(out);
35+
const fs::path clang = llvm / "bin" / ("clang" + exe);
36+
// The ELF linker: `ld.lld', or, where the payload ships another name of
37+
// the same driver (the Windows archive has `lld-link.exe' alone), that
38+
// driver told which flavour to be.
39+
std::string lld;
40+
for (const char* name : { "ld.lld", "lld", "lld-link" })
41+
if (const fs::path p = llvm / "bin" / (std::string(name) + exe); lld.empty() && fs::exists(p))
42+
lld = q(p) + (std::string_view(name) == "ld.lld" ? "" : " -flavor gnu");
43+
if (lld.empty()) {
44+
std::fprintf(stderr, "error: openkal-bind-tests: no lld in %s\n", (llvm / "bin").generic_string().c_str());
45+
return 1;
46+
}
47+
const fs::path note = out / "note.S", image = out / "libtwice.okso";
48+
std::string flags = std::format("--no-default-config --target={}-unknown-none-elf -ffreestanding -nostdlibinc -fPIC "
49+
"-fvisibility=hidden -femulated-tls -fasynchronous-unwind-tables -O2", arch);
50+
if (arch == "aarch64") flags += " -ffixed-x18 -mno-outline-atomics";
51+
mcpp::rerun_if_changed((root / "image" / "twice.c").generic_string().c_str());
52+
if (run(std::format("{} note-source > {}", q(okld), q(note))) != 0
53+
|| run(std::format("{} {} -c {} -o {}", q(clang), flags, q(root / "image" / "twice.c"), q(out / "twice.o"))) != 0
54+
|| run(std::format("{} {} -c {} -o {}", q(clang), flags, q(note), q(out / "note.o"))) != 0
55+
|| run(std::format("{} -shared -z max-page-size=65536 -z now -z noexecstack --hash-style=both -soname libtwice.okso -o {} {} {}",
56+
lld, q(image), q(out / "twice.o"), q(out / "note.o"))) != 0
57+
|| run(std::format("{} note {}", q(okld), q(image))) != 0) {
58+
std::fprintf(stderr, "error: openkal-bind-tests: the image was not built\n");
59+
return 1;
60+
}
61+
return mcpp::mcpplibs::openkal_bind::bind({
62+
.header = "include/twice.h",
63+
.image = image.generic_string(),
64+
});
65+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* libtwice.okso: freestanding C, built for <arch>-openkal by build.mcpp. */
2+
#include "../include/twice.h"
3+
__attribute__((visibility("default"))) int64_t twice(int64_t value) { return 2 * value; }
4+
__attribute__((visibility("default"))) int64_t twice_apply(twice_map map, int64_t value) { return 2 * map(value); }

0 commit comments

Comments
 (0)