Skip to main content

How to Use

Add BuildZri to your C++ project with the following steps.

Add the BuildZri script#

BuildZri comes as a Python v3 script that you can execute on GNU/Linux, macOS, and Windows. Copy-paste scripts/ into your scripts directory. Next, add required execution permissions on Unix or Unix-like platforms.

Create the configuration file#

Create the buildzri.config.json file for your project according to the reference. Look at the following minimal C++ project.

"std": "c++17",
"name": "BuildZri Sample",
"version": "1.0.1",
"output": "./bin/bzsample-${BZ_OS}_${BZ_ARCH}",
"source": {
"*": [
"definitions": {
"*": [

The above project consists of one C++ source file, but you can add multiple source files easily with the wildcard syntax. As show above, you can configure BuildZri to automatically set version details via a macro definition.

Inspect the build configuration file of the Neutralinojs framework to learn how to integrate BuildZri for medium-scale projects.

Start building binaries#

After configuring your project, run the script file to start the compilation process. For example, on Unix or Unix-like platforms, you can use the following command:


The compilation warnings and error messages will appear on the terminal as usual. Also, you can use the --verbose flag to identify pre-compilation issues. The BuildZri tool is built for both developers and CI/CD environments, so you can use the same build command on GitHub Actions, as shown below:

- name: Build
run: ./scripts/