diff --git a/build.zig b/build.zig index 72e5593..7bbafcc 100644 --- a/build.zig +++ b/build.zig @@ -46,4 +46,14 @@ pub fn build(b: *std.Build) void { // This will evaluate the `test` step rather than the default, which is "install". const test_step = b.step("test", "Run library tests"); test_step.dependOn(&run_main_tests.step); + + // Build Documentation + const doc = b.addInstallDirectory(.{ + .source_dir = lib.getEmittedDocs(), + .install_dir = .prefix, + .install_subdir = "docs", + }); + + const doc_step = b.step("doc", "Generate documentation"); + doc_step.dependOn(&doc.step); }