feat(pkg): x build-lib / prebuilt consumption — binary packages end-to-end (#64)
The package-manager half of prebuilt binary packages, on top of the compiler
foundation (dynamic system registration + --emit-module).
- x build-lib [module.ludic]: compile a package's module to a per-target native
dylib under lib/<target>/, with an @rpath install name so a consumer resolves
it from the content-addressed store.
- x link-flags: print the clang flags (the dylib, an rpath to its store dir,
-export_dynamic) so any build system links a project's prebuilt module dylibs;
x app splices them automatically for in-repo builds.
- kind prebuilt is resolved + linked like any dependency; a missing build target
stays a hard error.
Proven hermetically (macOS-gated, since dylibs are native): a module exporting a
component + an @System(Update) + a function is built with x build-lib, fetched
as a prebuilt dep, and linked into a consumer game that never saw its source —
the module's system mutates the shared world and its function is callable
("3 42"). Package suite 17/0; full suite 87/0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
e1537d2d45
commit
075a7b1430
6 changed files with 173 additions and 11 deletions
|
|
@ -43,6 +43,8 @@ program X {
|
|||
print(" x update [module] bump a dep (or all) to its latest published version, then relock")
|
||||
print(" x verify check every locked package against the store by content hash")
|
||||
print(" x vendor copy the resolved packages into ./vendor for offline builds")
|
||||
print(" x build-lib <module.ludic> (#64) compile a package's module to a prebuilt dylib in lib/<target>/")
|
||||
print(" x link-flags (#64) print the clang flags to link this project's prebuilt module dylibs")
|
||||
print("")
|
||||
print("test:")
|
||||
print(" x test the full regression suite")
|
||||
|
|
@ -121,6 +123,8 @@ program X {
|
|||
if (cmd == "update") { exit(cmd_pkg_update()) }
|
||||
if (cmd == "verify") { exit(cmd_pkg_verify()) }
|
||||
if (cmd == "vendor") { exit(cmd_pkg_vendor()) }
|
||||
if (cmd == "build-lib") { exit(cmd_pkg_build_lib()) }
|
||||
if (cmd == "link-flags") { exit(cmd_pkg_link_flags()) }
|
||||
if (cmd == "test-pkg") { exit(cmd_test_pkg()) }
|
||||
if (cmd == "version") or (cmd == "--version") or (cmd == "-v") { exit(cmd_version()) }
|
||||
if (cmd == "release") { exit(cmd_release()) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue