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.

rebuildInFuzzMode

Compile.rebuildInFuzzMode
pub fn rebuildInFuzzMode(
    compile: *Compile,
    maker: *Maker,
    compile_index: Configuration.Step.Index,
    progress_node: std.Progress.Node,
) !Path

File

Code

pub fn rebuildInFuzzMode(
    compile: *Compile,
    maker: *Maker,
    compile_index: Configuration.Step.Index,
    progress_node: std.Progress.Node,
) !Path {
    const gpa = maker.gpa;
    const step = maker.stepByIndex(compile_index);

    var arena_allocator: std.heap.ArenaAllocator = .init(gpa);
    defer arena_allocator.deinit();
    const arena = arena_allocator.allocator();

    step.result_error_msgs.clearRetainingCapacity();
    step.clearResultStderr(gpa);
    step.clearErrorBundle(gpa);
    step.result_error_bundle.deinit(gpa);
    step.result_error_bundle = std.zig.ErrorBundle.empty;

    step.clearFailedCommand(gpa);

    var argv: std.ArrayList([]const u8) = .empty;
    defer argv.deinit(gpa);

    try lowerZigArgs(arena, compile, compile_index, maker, progress_node, &argv, true);
    const maybe_output_bin_path = try Step.evalZigProcess(compile_index, maker, argv.items, progress_node, false);
    return maybe_output_bin_path.?;
}