mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-07 06:57:05 +00:00
Update cheatsheets
This commit is contained in:
16
tldr/zig
16
tldr/zig
@@ -16,25 +16,25 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`zig build run`
|
||||
|
||||
- Initialize a `zig build` application:
|
||||
- Initialize a `zig build` project with library and executable:
|
||||
|
||||
`zig init-exe`
|
||||
|
||||
- Initialize a `zig build` library:
|
||||
|
||||
`zig init-lib`
|
||||
`zig init`
|
||||
|
||||
- Create and run a test build:
|
||||
|
||||
`zig test {{path/to/file.zig}}`
|
||||
|
||||
- Cross compile, build and run a project for `x86_64` architecture and `windows` operating system:
|
||||
|
||||
`zig build run -fwine -Dtarget=x86_64-windows`
|
||||
|
||||
- Reformat Zig source into canonical form:
|
||||
|
||||
`zig fmt {{path/to/file.zig}}`
|
||||
|
||||
- Use Zig as a drop-in C compiler:
|
||||
- Translate a C file to `zig`:
|
||||
|
||||
`zig cc {{path/to/file.c}}`
|
||||
`zig translate-c -lc {{path/to/file.c}}`
|
||||
|
||||
- Use Zig as a drop-in C++ compiler:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user