Creates a proj-name
directory and creates a new C/C++ project inside of it.
# Creates a C project by default (both of the following are equivilent)
kiln new proj-name
kiln new proj-name --language c
# Optionally include the --cpp flag to create a C++ project instead
kiln new proj-name --language cpp
Create a C/C++ project in the current directory. Fails if there’s already a file named Kiln.toml
in the current directory.
# Creates a C project by default
kiln init
# Optionally include the --cpp flag to create a C++ project instead
kiln init --language cpp
Builds our project. The compiled binary will be created as build/XXX/proj-name
where XXX
is the compilation profile (debug
, and release
shown below).
# builds in --debug mode by default
kiln build
# build in --release mode, which will estimate the optimal compiler flags based on your source code
kiln build --release
Builds our projects and runs the compiled binary.
# runs in --debug mode by default
trufc kiln
# We can pass command line arguments to our program by entering them after `--`
trufc kiln --release -- arg1 arg2