diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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, |
