Downloading/install binary assets in build.zig

i was able to get the following to work, for anyone looking for a small gist:

const dep = b.dependency("mytool", .{});
const install_step = b.addInstallDirectory(.{
    .source_dir = dep.path("."),
     .install_dir = std.Build.InstallDir{ .custom = "tools" },
     .install_subdir = "mytool",
});
exe.step.dependOn(&install_step.step);
2 Likes