fz 1.6 & 1.7: build C, ASM and C++ without CMake hell
Source: Dev.to
New features in fz 1.6 & 1.7
Project initialization
fz init scaffolds a .fz.yaml, .fzignore and a README in one shot, eliminating the need to copy‑paste boilerplate before writing any code.
Configuration file support
The .fz.yaml file lets you define dependencies, flags, and output format once and forget about it. Large projects benefit from a single source of truth.
Ignoring files
.fzignore works like .gitignore: list patterns to skip and fz will ignore them during the build.
Flat binary output
-format bin produces raw binaries with no ELF headers—ideal for bootloaders and firmware where the header is dead weight.
Automatic library injection
Libraries listed under libs in the config are auto‑injected (e.g., -lm, -lc, or any other required libraries).
Easy flag management
flags.cc lets you drop in compiler flags such as -O3 -march=native without touching a build script.
Parallel builds
-j N enables parallel compilation. On a 12‑core machine the build spreads across threads faster than you can blink, a huge relief for system‑software projects where every file matters.
Linker script support
Pass linker scripts (-T, -Ttext) for precise address control—essential for OS and embedded target development.
Interactive shell
fz -shell drops you into an interactive mode where you can tweak parameters, build, clean, and watch output live. This is handy when you’re deep in a debug loop and don’t want to retype the same command dozens of times.
Full C++ support
Files with .cpp, .cc, or .cxx extensions compile with the same strict flags as C, providing consistent behavior across languages.
Installation
go install github.com/forgezero-cli/ForgeZero/cmd/fz@latest
Resources
- Documentation, examples, and community forum:
- Fully open source; pull requests are welcome.