This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.
fnwriteIpc(writer: *Io.Writer, serialized: Serialized) Io.Writer.Error!void {
// Byteswap if necessary to ensure little endian over the pipe. This is
// needed because the parent or child process might be running in qemu.
if (is_big_endian) for (serialized.storage) |*s| s.byteSwap();
assert(serialized.parents.len == serialized.storage.len);
constserialized_len: u8 = @intCast(serialized.parents.len);
constheader = std.mem.asBytes(&serialized_len);
conststorage = std.mem.sliceAsBytes(serialized.storage);
constparents = std.mem.sliceAsBytes(serialized.parents);
varvec = [3][]constu8{ header, storage, parents };
trywriter.writeVecAll(&vec);
}