#
CLAP is an open-source command-line frontend for C and C++. It uses a pinned, checksum-verified Zig toolchain when a compiler is needed, so a small C or C++ project can build without asking the user to set up a separate compiler first.
The project can build and run individual files:
python -m pip install clap-compiler
clap run examples/hello/main.c
It can also configure and build existing CMake projects with Ninja:
clap cmake examples/cmake
The PyPI package is clap-compiler. If you have a fresh Windows x64 VM with Python, we are collecting independent first-run results for the pinned Zig toolchain and the C, C++, and CMake examples. Please share your results in the Windows test thread. This update was drafted with AI assistance.
Project and source: GitHub - BRATAN-CORP/clap: 👏 CLAP — zero-setup C/C++ compiler frontend. C Like A Python, simple as clap. · GitHub
I would appreciate feedback from Zig users on the toolchain integration, target handling, and whether this workflow fits the way you use Zig around C and C++ projects.
pachde 2
Better to pick a different name. CLAP is an existing open source standard for audio plugins, and also libraries for command line parsing.
1 Like