All apps/Zig

Zig

zig

A general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

Runs as zig|macOS, Linux, Windows|ziglang.org

Command form

ai-draft · 5 tasks · 13 fields

Build, run and format Zig sources. Only common compiler flags are included; linker, WebAssembly and debug flags are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui zig

zig build-exe

Build executable

Create an executable from Zig source or object files.

Build executableExample values, fixed in this page — nothing here reaches a terminal
Basic
Source files*
file
Output name
string
TasksEach one presets the form for one job
Debug build
filesname
Small release build
filesoptimizestripname
ParametersOnly these flags are editable in the form
Source files
path · positional 0 · repeatable
Optimize mode
enum
-ODebugReleaseFastReleaseSafeReleaseSmall
Output name
Override the root name (not a file path).
string
--name
Omit debug symbols
boolean
-fstrip
Single-threaded
boolean
-fsingle-threaded
Static link
boolean
-static
Link libraries
string · repeatable
--library-l

zig run

Build and run

Create an executable and run it immediately.

Build and runExample values, fixed in this page — nothing here reaches a terminal
Basic
Source files*
file
Optimize mode
4 choicesenum
TasksEach one presets the form for one job
Run a file
filesoptimize
ParametersOnly these flags are editable in the form
Source files
path · positional 0 · repeatable
Optimize mode
enum
-ODebugReleaseFastReleaseSafeReleaseSmall
Link libraries
string · repeatable
--library-l

zig fmt

Format source

Reformat Zig source into canonical form.

Format sourceExample values, fixed in this page — nothing here reaches a terminal
Basic
Files or directories*
any
TasksEach one presets the form for one job
Format files
files
Check formatting
filescheck
ParametersOnly these flags are editable in the form
Files or directories
path · positional 0 · repeatable
Check only
List non-conforming files and exit with an error.
boolean
--check
Run ast-check
boolean
--ast-check
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed zig against its version. A form that does not match your version is not offered.