Skip to content

Commit

Permalink
engine: improve stdlib usage docs
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Jun 1, 2024
1 parent 42008c2 commit e65d3a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/engine/stdlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ Then make it importable by your code in `build.zig`, e.g.:
```zig
pub fn build(b: *std.Build) void {
// ...
// Add Mach to our library and executable
const mach_dep = b.dependency("mach", .{
.target = target,
.optimize = optimize,
});
lib.root_module.addImport("mach", mach_dep.module("mach"));
exe.root_module.addImport("mach", mach_dep.module("mach"));
}
```
Expand Down

0 comments on commit e65d3a9

Please sign in to comment.