From 621d7fee0ace729f8d44126032d2c6e13f72ee7f Mon Sep 17 00:00:00 2001 From: t Date: Tue, 7 Jul 2026 11:29:23 -0600 Subject: Move libpanto projects to libpantograph dependency Remove the in-repo libpanto sources and binding projects from pantograph. Consume libpantograph through the Zig package URL at code.tjp.lol/libpantograph.git, including the Lua module artifact used by CLI extensions. --- build.zig | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 5e0078c..4c98b6d 100644 --- a/build.zig +++ b/build.zig @@ -13,17 +13,12 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); - // The native Lua C-module (`libpanto-lua`). We embed its compiled + // The native Lua C-module. We embed its compiled // `panto.so` into the panto binary and stage it onto the embedded // VM's `package.cpath` at bootstrap, so `require('panto')` resolves // to the native agent/stream module on a cold, network-less machine - // (the guaranteed initial module load — see - // docs/step19-cli-panto-module-plan.md). - const panto_lua_dep = b.dependency("panto_lua", .{ - .target = target, - .optimize = optimize, - }); - const panto_so_embed_path = generatePantoSoEmbed(b, panto_lua_dep); + // (the guaranteed initial module load). + const panto_so_embed_path = generatePantoSoEmbed(b, panto_lib_dep); // TOML parser (used by the CLI for ~/.config/panto/models.toml). // We disable the upstream's optional thread-pool dep — we only need @@ -463,17 +458,16 @@ fn generateLuaHeadersEmbed( /// Codegen step: embed the compiled `libpanto-lua` `panto.so` into a Zig /// module the bootstrap stages onto the embedded VM's `package.cpath`. /// -/// We address the artifact via `dep.artifact("panto")` (the `addLibrary` -/// Compile step named `panto` in `libpanto-lua/build.zig`) and embed its +/// We address the artifact via `dep.artifact("panto_lua")` and embed its /// emitted binary by bytes — name-agnostic, so the upstream `libpanto.so`/ /// `libpanto.dylib` filename is irrelevant; we always stage it as /// `panto.so`. The `.so` is copied next to the generated module so /// `@embedFile` can resolve it. fn generatePantoSoEmbed( b: *std.Build, - panto_lua_dep: *std.Build.Dependency, + panto_dep: *std.Build.Dependency, ) std.Build.LazyPath { - const so_path = panto_lua_dep.artifact("panto").getEmittedBin(); + const so_path = panto_dep.artifact("panto_lua").getEmittedBin(); const tool = b.addExecutable(.{ .name = "gen-panto-so-embed", -- cgit v1.3