Skip to content

Instantly share code, notes, and snippets.

@jacobly0
Created April 5, 2024 07:06
Show Gist options
  • Save jacobly0/6db60f822ccf8e6592ccbf64373676c9 to your computer and use it in GitHub Desktop.
Save jacobly0/6db60f822ccf8e6592ccbf64373676c9 to your computer and use it in GitHub Desktop.
Dependency example
const std = @import("std");
pub fn build(b: *std.Build) void {
const github_dep = b.dependency("github", .{});
const exe = b.addExecutable(.{
.name = "name",
});
exe.root_module.addIncludePath(github_dep.path("include"));
}
.{
.name = "mypackage",
.version = "0.0.0",
.dependencies = .{
.github = .{
.url = "git+https://github.com/user/repo.git#commit-hash",
.hash = "...", // fill this in later when you get an error telling you what hash to use
},
.local = .{
.path = "path/to/dep",
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment