Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Struct

CompileResult

Public Struct
std.Build.abi.time_report.CompileResult
pub const CompileResult = extern struct

WebSocket server->client.

Sent after a Step.Compile finishes, providing the step's time report.

Trailing:

  • llvm_pass_timings: [llvm_pass_timings_len]u8 (ASCII-encoded)
  • for each files_len:
    • name (null-terminated UTF-8 string)
  • for each decls_len:
    • name (null-terminated UTF-8 string)
    • file: u32 (index of file this decl is in)
    • sema_ns: u64 (nanoseconds spent semantically analyzing this decl)
    • codegen_ns: u64 (nanoseconds spent semantically analyzing this decl)
    • link_ns: u64 (nanoseconds spent semantically analyzing this decl)

Fields

tag: ToClientTag = .time_report_compile_result
step_idx: u32
flags: Flags
stats: Stats
ns_total: u64
llvm_pass_timings_len: u32
files_len: u32
decls_len: u32

Structs

File

Build/abi.zig:464
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
    pub const CompileResult = extern struct {
        tag: ToClientTag = .time_report_compile_result,

        step_idx: u32 align(1),

        flags: Flags,
        stats: Stats align(1),
        ns_total: u64 align(1),

        llvm_pass_timings_len: u32 align(1),
        files_len: u32 align(1),
        decls_len: u32 align(1),

        pub const Flags = packed struct(u8) {
            use_llvm: bool,
            _: u7 = 0,
        };

        pub const Stats = extern struct {
            n_reachable_files: u32,
            n_imported_files: u32,
            n_generic_instances: u32,
            n_inline_calls: u32,

            cpu_ns_parse: u64,
            cpu_ns_astgen: u64,
            cpu_ns_sema: u64,
            cpu_ns_codegen: u64,
            cpu_ns_link: u64,

            real_ns_files: u64,
            real_ns_decls: u64,
            real_ns_llvm_emit: u64,
            real_ns_link_flush: u64,

            pub const init: Stats = .{
                .n_reachable_files = 0,
                .n_imported_files = 0,
                .n_generic_instances = 0,
                .n_inline_calls = 0,
                .cpu_ns_parse = 0,
                .cpu_ns_astgen = 0,
                .cpu_ns_sema = 0,
                .cpu_ns_codegen = 0,
                .cpu_ns_link = 0,
                .real_ns_files = 0,
                .real_ns_decls = 0,
                .real_ns_llvm_emit = 0,
                .real_ns_link_flush = 0,
            };
        };
    }