diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -20,6 +20,10 @@ pub fn build(b: *std.Build) void { // of this build script using `b.option()`. All defined flags (including // target and optimize options) will be listed when running `zig build --help` // in this directory. + const zio = b.dependency("zio", .{ + .target = target, + .optimize = optimize, + }); // Here we define an executable. An executable needs to have a root module // which needs to expose a `main` function. While we could add a main function @@ -44,6 +48,7 @@ pub fn build(b: *std.Build) void { // unlike b.addModule, it does not expose the module to consumers of // this package, which is why in this case we don't have to give it a name. .root_source_file = b.path("src/main.zig"), + .imports = &[_]std.Build.Module.Import{.{ .name = "zio", .module = zio.module("zio") }}, // Target and optimization levels must be explicitly wired in when // defining an executable or library (in the root module), and you // can also hardcode a specific target for an executable or library |
