mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 17:15:32 +02:00
zig: add page (#6585)
This commit is contained in:
parent
68125f7c60
commit
ff29c52c2f
1 changed files with 36 additions and 0 deletions
36
pages/common/zig.md
Normal file
36
pages/common/zig.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# zig
|
||||
|
||||
> The Zig compiler and toolchain.
|
||||
> More information: <https://ziglang.org>.
|
||||
|
||||
- Compile the project in the current directory:
|
||||
|
||||
`zig build`
|
||||
|
||||
- Compile and run the project in the current directory:
|
||||
|
||||
`zig build run`
|
||||
|
||||
- Initialize a `zig build` application:
|
||||
|
||||
`zig init-exe`
|
||||
|
||||
- Intitialize a `zig build` library:
|
||||
|
||||
`zig init-lib`
|
||||
|
||||
- Create and run a test build:
|
||||
|
||||
`zig test {{path/to/file.zig}}`
|
||||
|
||||
- Reformat Zig source into canonical form:
|
||||
|
||||
`zig fmt {{path/to/file.zig}}`
|
||||
|
||||
- Use Zig as a drop-in C compiler:
|
||||
|
||||
`zig cc {{path/to/file.c}}`
|
||||
|
||||
- Use Zig as a drop-in C++ compiler:
|
||||
|
||||
`zig c++ {{path/to/file.cpp}}`
|
Loading…
Add table
Reference in a new issue