summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 5bf5d44..4e4e862 100644
--- a/build.zig
+++ b/build.zig
@@ -13,6 +13,15 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
+ // TOML parser (used by the CLI for ~/.config/panto/models.toml).
+ // We disable the upstream's optional thread-pool dep — we only need
+ // sequential parsing of a small config file.
+ const toml_dep = b.dependency("toml", .{
+ .target = target,
+ .optimize = optimize,
+ .@"thread-pool" = false,
+ });
+
// Fetch upstream Lua source (used both for our static library and
// staged at runtime as the `include/` headers under $PANTO_HOME).
// Reproducibility comes from the content-addressed hash in
@@ -47,6 +56,7 @@ pub fn build(b: *std.Build) void {
.link_libc = true,
});
exe_mod.addImport("panto", panto_lib_dep.module("panto"));
+ exe_mod.addImport("toml", toml_dep.module("toml"));
exe_mod.addImport("versions", versions_mod.createModule());
exe_mod.addImport("embedded_luarocks", b.createModule(.{
.root_source_file = luarocks_embed_path,
@@ -103,6 +113,7 @@ pub fn build(b: *std.Build) void {
.link_libc = true,
});
test_mod.addImport("panto", panto_lib_dep.module("panto"));
+ test_mod.addImport("toml", toml_dep.module("toml"));
test_mod.addImport("versions", versions_mod.createModule());
test_mod.addImport("embedded_luarocks", b.createModule(.{
.root_source_file = luarocks_embed_path,