native "<target>" "<path>" in a package's package.ludic; the compiler records the libraries of every package a program imports and writes them into the IR (; ludic-native:), so ludicc -o, ludic build, ludic test and ludic bundle all link one list. macOS: an rpath to the package and to Contents/Frameworks, where ludic bundle copies and signs each library and drops the build machine's rpath. Windows: the import library, the .dll copied beside the exe (--natives-out for the bundle). tools/native/lib.sh builds from a pinned, checksummed source with clang on both machines; ludic.nativeecho is the worked example; the shim rules are in packages/README.md. Linked at build time rather than dlopen (docs/PACKAGES.md says why). Reseeded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 lines
508 B
Text
7 lines
508 B
Text
# native.ludic - the shim's symbols (native/shim/nativeecho.c), in the types that cross:
|
|
# int, long, float and a slice's data as a pointer. Nothing here is exported.
|
|
extern function ne_sum(xs: pointer, n: int) -> float = "ne_sum"
|
|
extern function ne_scan(xs: pointer, n: int, over: float) -> int = "ne_scan"
|
|
extern function ne_drain(kinds: pointer, values: pointer, cap: int) -> int = "ne_drain"
|
|
extern function ne_lost_count() -> int = "ne_lost_count"
|
|
extern function ne_twice(x: long) -> long = "ne_twice"
|