Hi folks,
I’m currently toying with my first zig library GitHub - yamafaktory/hyperzig: HyperZig - A Hypergraph Implementation in Zig and would like to add a build step to generate the documentation within the build.zig
file (e.g. zig build docs
).
I know that can already build it using zig build-lib -femit-docs src/hyperzig.zig
and then browse the result via a local dev server (e.g. python -m http.server 8000
).
N.B.: I’m using 0.13.0
.
Hi! Here’s how you can generate docs in build.zig
:
This community-driven doc is an attempt to expand on the official Zig Build System documentation as well as the past community contributions by xq , Sobeston and others.
Here you’ll find a list of tricks on how to use every part of the build system while making sure to conveniently name and lay out your build steps.
I. Basic Usage
1) Declare commonly used information upfront
// Resolve a query for a custom target
const my_target = b.resolveTargetQuery(.{
.cpu_arch = .wasm32,
.os_tag =…
1 Like
Thanks a ton @tensorush ! Works like a charm
1 Like