yashtajne/candie
a simple c/c++ build tool
A Simple C/C++ Build tool. which uses Zig as a drop-in compiler for compiling .c and .cpp files. No Build system needed, Does not generate Makefiles.
Candie.kit is is available on PyPI so it can be installed with this command.
pip install candie.kit
After installation you can run this command to get help. or verify that its successfully installed.
candie --help
Every project must contain a Build Instruction file, Named Candiefile
and this file should always be placed in the project root directory.
project/
├── main.c
├── greet.c
└── Candiefile
So create this file for your project.
The Candiefile
file can contain sections of code.
A Section can be created like this [SECTION_NAME] using square brackets, section name must be UPPERCASE. [SETUP] is a required section.
Example Candiefile 👇️
[SETUP]
PROJ_NAME = 'your_project_name'
project(
name = PROJ_NAME,
language = C,
)
[BUILD]
executable(
PROJ_NAME,
'./main.c',
'./greet.c'
).create()
You can either provide the source file paths manually or use the grab_sources()
function
and provide the directory path of the src files.
Call the create()
method to create the executable, You can provide .create(debug = True)
to add debugging symbols to the executable.
finally, run this command to execute the build section.
candie build
This will create a executable named 'your_project_name'
Here, Example project simple-exe
This project is licensed under the Apache 2.0 License.
Made with 🧡 by Yash Tajne