.
Size: a a a
.
A
.
zig --help
Usage: C:\ProgramData\chocolatey\lib\zig\tools\zig-windows-x86_64-0.4.0\zig.exe [command] [options]
Commands:
build build project from build.zig
build-exe [source] create executable from source or object files
build-lib [source] create library from source or object files
build-obj [source] create object from source or assembly
builtin show the source code of that @import("builtin")
cc C compiler
fmt parse files and render in canonical zig format
id print the base64-encoded compiler id
init-exe initialize a `zig build` application in the cwd
init-lib initialize a `zig build` library in the cwd
libc [paths_file] Display native libc paths file or validate one
run [source] [-- [args]] create executable and run immediately
translate-c [source] convert c code to zig code
targets list available compilation targets
test [source] create and run a test build
version print version number and exit
zen print zen of zig and exit
Compile Options:
--assembly [source] add assembly file to build
--c-source [options] [file] compile C source code
--cache-dir [path] override the local cache directory
--cache [auto|off|on] build in cache, print output path to stdout
--color [auto|off|on] enable or disable colored error messages
--disable-gen-h do not generate a C header file (.h)
--disable-pic disable Position Independent Code
--enable-pic enable Position Independent Code
--disable-valgrind omit valgrind client requests in debug builds
--enable-valgrind include valgrind client requests release builds
--emit [asm|bin|llvm-ir] emit a specific file format as compilation output
-ftime-report print timing diagnostics
--libc [file] Provide a file which specifies libc paths
--name [name] override output name
--output-dir [dir] override output directory (defaults to cwd)
--pkg-begin [name] [path] make pkg available to import and push current pkg
--pkg-end pop current pkg
--main-pkg-path set the directory of the root package
--release-fast build with optimizations on and safety off
--release-safe build with optimizations on and safety on
--release-small build with size optimizations on and safety off
--single-threaded source may assume it is only used single-threaded
-dynamic create a shared library (.so; .dll; .dylib)
--strip exclude debug symbols
-target [name] <arch><sub>-<os>-<abi> see the targets command
--verbose-tokenize enable compiler debug output for tokenization
--verbose-ast enable compiler debug output for AST parsing
--verbose-link enable compiler debug output for linking
--verbose-ir enable compiler debug output for Zig IR
--verbose-llvm-ir enable compiler debug output for LLVM IR
--verbose-cimport enable compiler debug output for C imports
--verbose-cc enable compiler debug output for C compilation
-dirafter [dir] same as -isystem but do it last
-isystem [dir] add additional search path for other .h files
-mllvm [arg] forward an arg to LLVM's option processing
--override-std-dir [arg] use an alternate Zig standard library
.
.
A
.
.
$ zig build-exe discard.zig
/home/andy/dev/www.ziglang.org/docgen_tmp/discard.zig:5:7: error: error is discarded
_ = File.openRead("does_not_exist/foo.txt");
^
.
$ zig build-exe discard.zig
/home/andy/dev/www.ziglang.org/docgen_tmp/discard.zig:5:7: error: error is discarded
_ = File.openRead("does_not_exist/foo.txt");
^
.
.
A
.
A
.
.
.
A
.