Zig is a [[Language#Systems|Systems Level]] [[Programming]] language that aims to replace the [[C Language]]. Notable features include no hidden operations and explicit allocation.
It's cross-compilable since it's based on LLVM, and its [[ABI]] is C-Compatible. It's pre 1.0 right now.
Invoking the Zig compiler is akin to invoking [[Rust#Cargo|cargo]] and project management happens via `zig`.
Zig prides itself on having 0 hidden "stuff". No hidden control flow, no hidden allocations. Not even any macros. No standard library if you don't need it either -- parts of it are compiled in only if used.
Zig by default only statically compiles.
## Zig Language
## Memory
Zig is notable for requiring the use of allocators anywhere memory needs to allocated. There's no default. You can use the C compatible allocator, but even stack memory needs an allocator!
## Zig Build System
Zig has a build system, similar to cargo. This does not need to be used, but the build.zig file acts like [[CMake]] and [[GCC]] at the same time.
## Testing
Zig has it's own built-in testing framework.
# References