Zig 0.17.0-dev (Split by item)

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.

js

main.js
const js = struct

File

lib/docs/wasm/main.zig:19

Code

const js = struct {
    /// Keep in sync with the `LOG_` constants in `main.js`.
    const LogLevel = enum(u8) {
        err,
        warn,
        info,
        debug,
    };

    extern "js" fn log(level: LogLevel, ptr: [*]const u8, len: usize) void;
}