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

Run

Public Struct
std.Build.Configuration.Step.Run
pub const Run = struct

Fields

flags: @This().Flags
flags2: Flags2
args: Storage.LengthPrefixedList(Arg.Index)
cwd: Storage.FlagOptional(.flags, .cwd, LazyPath.Index)
preopens: Storage.FlagLengthPrefixedList(.flags, .preopens, Preopen)
captured_stdout: Storage.FlagOptional(.flags, .captured_stdout, CapturedStream)
captured_stderr: Storage.FlagOptional(.flags, .captured_stderr, CapturedStream)
file_inputs: Storage.LengthPrefixedList(LazyPath.Index)
stdio_limit: Storage.FlagOptional(.flags, .stdio_limit, u64)
producer: Storage.FlagOptional(.flags, .producer, Step.Index)

Always a compile step.

environ_map: Storage.FlagOptional(.flags, .environ_map, EnvironMap.Index)

First half is keys, second half is values.

stdin: Storage.FlagUnion(.flags, .stdin, StdIn)
expect_stderr_exact: Storage.FlagOptional(.flags2, .expect_stderr_exact, Bytes)
expect_stdout_exact: Storage.FlagOptional(.flags2, .expect_stdout_exact, Bytes)
expect_stderr_match: Storage.FlagLengthPrefixedList(.flags2, .expect_stderr_match, Bytes)
expect_stdout_match: Storage.FlagLengthPrefixedList(.flags2, .expect_stdout_match, Bytes)
expect_term_value: Storage.FlagOptional(.flags2, .expect_term, u32)
expect_stdout_snapshot: Storage.FlagOptional(.flags2, .expect_stdout_snapshot, LazyPath.Index)
expect_stderr_snapshot: Storage.FlagOptional(.flags2, .expect_stderr_snapshot, LazyPath.Index)

Structs

Types

File

Build/Configuration.zig:567
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
    pub const Run = struct {
        flags: @This().Flags,
        flags2: Flags2,
        args: Storage.LengthPrefixedList(Arg.Index),
        cwd: Storage.FlagOptional(.flags, .cwd, LazyPath.Index),
        preopens: Storage.FlagLengthPrefixedList(.flags, .preopens, Preopen),
        captured_stdout: Storage.FlagOptional(.flags, .captured_stdout, CapturedStream),
        captured_stderr: Storage.FlagOptional(.flags, .captured_stderr, CapturedStream),
        file_inputs: Storage.LengthPrefixedList(LazyPath.Index),
        stdio_limit: Storage.FlagOptional(.flags, .stdio_limit, u64),
        /// Always a compile step.
        producer: Storage.FlagOptional(.flags, .producer, Step.Index),
        /// First half is keys, second half is values.
        environ_map: Storage.FlagOptional(.flags, .environ_map, EnvironMap.Index),
        stdin: Storage.FlagUnion(.flags, .stdin, StdIn),
        expect_stderr_exact: Storage.FlagOptional(.flags2, .expect_stderr_exact, Bytes),
        expect_stdout_exact: Storage.FlagOptional(.flags2, .expect_stdout_exact, Bytes),
        expect_stderr_match: Storage.FlagLengthPrefixedList(.flags2, .expect_stderr_match, Bytes),
        expect_stdout_match: Storage.FlagLengthPrefixedList(.flags2, .expect_stdout_match, Bytes),
        expect_term_value: Storage.FlagOptional(.flags2, .expect_term, u32),
        expect_stdout_snapshot: Storage.FlagOptional(.flags2, .expect_stdout_snapshot, LazyPath.Index),
        expect_stderr_snapshot: Storage.FlagOptional(.flags2, .expect_stderr_snapshot, LazyPath.Index),

        pub const CapturedStream = extern struct {
            generated_file: GeneratedFileIndex,
            basename: String,
        };

        pub const Arg = struct {
            flags: @This().Flags,
            prefix: Storage.FlagOptional(.flags, .prefix, String),
            suffix: Storage.FlagOptional(.flags, .suffix, String),
            basename: Storage.FlagOptional(.flags, .basename, String),
            path: Storage.FlagOptional(.flags, .path, LazyPath.Index),
            /// Always a compile step.
            producer: Storage.FlagOptional(.flags, .producer, Step.Index),
            generated: Storage.FlagOptional(.flags, .generated, GeneratedFileIndex),

            pub const Flags = packed struct(u32) {
                tag: Arg.Tag,
                prefix: bool,
                suffix: bool,
                basename: bool,
                path: bool,
                producer: bool,
                generated: bool,
                dep_file: bool,
                make_absolute: bool,
                _: u20 = 0,
            };

            pub const Tag = enum(u4) {
                artifact,
                /// `path` contains the file.
                path_file,
                path_directory,
                /// `prefix` contains the string.
                string,
                file_content,
                output_file,
                output_directory,
                passthru,
                /// `prefix` contains the enabled string.
                /// `suffix` contains the disabled string.
                enable_darling,
                enable_qemu,
                enable_rosetta,
                enable_wasmtime,
                enable_wine,
            };

            pub const Index = IndexType(@This());
        };

        pub const Color = enum(u4) {
            /// `CLICOLOR_FORCE` is set, and `NO_COLOR` is unset.
            enable,
            /// `NO_COLOR` is set, and `CLICOLOR_FORCE` is unset.
            disable,
            /// If the build runner is using color, equivalent to `.enable`. Otherwise, equivalent to `.disable`.
            inherit,
            /// If stderr is captured or checked, equivalent to `.disable`. Otherwise, equivalent to `.inherit`.
            auto,
            /// The build runner does not modify the `CLICOLOR_FORCE` or `NO_COLOR` environment variables.
            /// They are treated like normal variables, so can be controlled through `setEnvironmentVariable`.
            manual,
        };

        pub const Preopen = extern struct {
            name: String,
            path: LazyPath.Index,
        };

        pub const StdIn = union(@This().Tag) {
            none: void,
            bytes: Bytes,
            lazy_path: LazyPath.Index,

            pub const Tag = enum(u2) { none, bytes, lazy_path };
        };
        pub const TrimWhitespace = enum(u2) { none, all, leading, trailing };
        pub const StdIo = enum(u2) { infer_from_args, inherit, check, zig_test };

        pub const ExpectTermStatus = enum(u2) { exited, signal, stopped, unknown };

        pub const Flags = packed struct(u32) {
            tag: Tag = .run,
            disable_zig_progress: bool,
            skip_foreign_checks: bool,
            failing_to_execute_foreign_is_an_error: bool,
            has_side_effects: bool,
            test_runner_mode: bool,
            color: Color,
            stdin: StdIn.Tag,
            stdio: StdIo,
            stdout_trim_whitespace: TrimWhitespace,
            stderr_trim_whitespace: TrimWhitespace,
            stdio_limit: bool,
            producer: bool,
            cwd: bool,
            captured_stdout: bool,
            captured_stderr: bool,
            environ_map: bool,
            preopens: bool,
            _: u3 = 0,
        };

        pub const Flags2 = packed struct(u32) {
            expect_stderr_exact: bool,
            expect_stdout_exact: bool,
            expect_stderr_match: bool,
            expect_stdout_match: bool,
            expect_term: bool,
            expect_term_status: ExpectTermStatus,
            expect_stdout_snapshot: bool,
            expect_stderr_snapshot: bool,
            _: u23 = 0,
        };
    }