Created
April 5, 2024 07:06
-
-
Save jacobly0/6db60f822ccf8e6592ccbf64373676c9 to your computer and use it in GitHub Desktop.
Dependency example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.{ | |
.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