id = "zig" name = "Zig" description = "A general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software." homepage = "https://ziglang.org" executables = ["zig"] [commands] format = 1 label = "Zig toolchain" description = "Build, run and format Zig sources. Only common compiler flags are included; linker, WebAssembly and debug flags are left out." quality = "ai-draft" base = "fig:zig" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/zig.ts" license = "MIT" [[commands.subcommand]] path = ["build-exe"] label = "Build executable" description = "Create an executable from Zig source or object files." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/zig.ts" license = "MIT" [[commands.subcommand.field]] id = "files" label = "Source files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "optimize" label = "Optimize mode" type = "enum" option = ["-O"] choices = [{ value = "Debug", label = "Debug" }, { value = "ReleaseFast", label = "ReleaseFast" }, { value = "ReleaseSafe", label = "ReleaseSafe" }, { value = "ReleaseSmall", label = "ReleaseSmall" }] sources = ["fig"] [[commands.subcommand.field]] id = "name" label = "Output name" description = "Override the root name (not a file path)." type = "string" option = ["--name"] sources = ["fig"] [[commands.subcommand.field]] id = "strip" label = "Omit debug symbols" type = "boolean" option = ["-fstrip"] sources = ["fig"] [[commands.subcommand.field]] id = "single_threaded" label = "Single-threaded" type = "boolean" option = ["-fsingle-threaded"] sources = ["fig"] [[commands.subcommand.field]] id = "static" label = "Static link" type = "boolean" option = ["-static"] sources = ["fig"] [[commands.subcommand.field]] id = "library" label = "Link libraries" type = "string" option = ["--library", "-l"] multiple = true sources = ["fig"] [[commands.subcommand.task]] id = "debug" label = "Debug build" fields = ["files", "name"] required = ["files"] [[commands.subcommand.task]] id = "release" label = "Small release build" fields = ["files", "optimize", "strip", "name"] required = ["files"] set = { optimize = ["ReleaseSmall"], strip = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["files", "optimize", "name"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["strip", "single_threaded", "static", "library"] [[commands.subcommand]] path = ["run"] label = "Build and run" description = "Create an executable and run it immediately." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/zig.ts" license = "MIT" [[commands.subcommand.field]] id = "files" label = "Source files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "optimize" label = "Optimize mode" type = "enum" option = ["-O"] choices = [{ value = "Debug", label = "Debug" }, { value = "ReleaseFast", label = "ReleaseFast" }, { value = "ReleaseSafe", label = "ReleaseSafe" }, { value = "ReleaseSmall", label = "ReleaseSmall" }] sources = ["fig"] [[commands.subcommand.field]] id = "library" label = "Link libraries" type = "string" option = ["--library", "-l"] multiple = true sources = ["fig"] [[commands.subcommand.task]] id = "run" label = "Run a file" fields = ["files", "optimize"] required = ["files"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["files", "optimize", "library"] [[commands.subcommand]] path = ["fmt"] label = "Format source" description = "Reformat Zig source into canonical form." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/zig.ts" license = "MIT" [[commands.subcommand.field]] id = "files" label = "Files or directories" type = "path" position = 0 multiple = true path = { kind = "any", role = "input" } effect = "overwrite" sources = ["fig"] [[commands.subcommand.field]] id = "check" label = "Check only" description = "List non-conforming files and exit with an error." type = "boolean" option = ["--check"] sources = ["fig"] [[commands.subcommand.field]] id = "ast_check" label = "Run ast-check" type = "boolean" option = ["--ast-check"] sources = ["fig"] [[commands.subcommand.task]] id = "format" label = "Format files" fields = ["files"] required = ["files"] [[commands.subcommand.task]] id = "check" label = "Check formatting" fields = ["files", "check"] required = ["files"] set = { check = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["files", "check", "ast_check"]