Skip to content

Commit 51b08be

Browse files
ronald-mzSobeston
authored andcommitted
Update 07-modules.md
ziglang/zig#18160 changed module syntax. This change brings the documentation in line with these updates.
1 parent 5b7bfd3 commit 51b08be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/docs/03-build-system/07-modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ To your newly made `build.zig`, add the following lines.
3333

3434
```zig
3535
const table_helper = b.addModule("table-helper", .{
36-
.source_file = .{ .path = "libs/table-helper/table-helper.zig" }
36+
.root_source_file = .{ .path = "libs/table-helper/table-helper.zig" }
3737
});
38-
exe.addModule("table-helper", table_helper);
38+
exe.root_module.addImport("table-helper", table_helper);
3939
```
4040

4141
Now when run via `zig build`,

0 commit comments

Comments
 (0)