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.

serveErrorBundle

main.serveErrorBundle
fn serveErrorBundle(arena: std.mem.Allocator, io: Io, diagnostics: *const aro.Diagnostics) !void

File

Code

fn serveErrorBundle(arena: std.mem.Allocator, io: Io, diagnostics: *const aro.Diagnostics) !void {
    const error_bundle = try compiler_util.aroDiagnosticsToErrorBundle(
        diagnostics,
        arena,
        "translation failure",
    );
    var stdout_buffer: [1024]u8 = undefined;
    var stdout_writer = Io.File.stdout().writer(io, &stdout_buffer);
    var server: std.zig.Server = .{
        .out = &stdout_writer.interface,
        .in = undefined,
    };
    try server.serveErrorBundle(error_bundle);
}