summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig18
1 files changed, 6 insertions, 12 deletions
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",