1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-30 23:35:23 +02:00

zig: update according to current and next release (#14991)

This commit is contained in:
Igor Támara 2024-12-05 23:43:07 -05:00 committed by GitHub
parent 6dae7649c6
commit 249b62bb0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,25 +11,25 @@
`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: