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.

fuzzWorkerRun

Fuzz.fuzzWorkerRun
fn fuzzWorkerRun(fuzz: *Fuzz, run_index: Configuration.Step.Index) void

File

Code

fn fuzzWorkerRun(fuzz: *Fuzz, run_index: Configuration.Step.Index) void {
    const maker = fuzz.maker;
    const graph = maker.graph;
    const io = graph.io;
    const conf = &maker.scanned_config.configuration;
    const run = &maker.stepByIndex(run_index).extended.run;

    run.rerunInFuzzMode(run_index, fuzz, fuzz.prog_node) catch |err| switch (err) {
        error.MakeFailed => {
            var buf: [256]u8 = undefined;
            const stderr = io.lockStderr(&buf, graph.stderr_mode) catch |e| switch (e) {
                error.Canceled => return,
            };
            defer io.unlockStderr();
            maker.printErrorMessages(run_index, .{}, stderr.terminal(), .verbose, .indent) catch {};
            return;
        },
        else => {
            const step_name = run_index.ptr(conf).name.slice(conf);
            log.err("step {s}: failed to rerun in fuzz mode: {t}", .{ step_name, err });
            return;
        },
    };
}