Skip to main content

Quickstart

This minimal guide will get you started using confy as quickly as humanly possible.

Create an empty folder

We will start with an empty folder just for this guide.

mkdir quickstart
cd quickstart

Create a folder named src

mkdir ./src

Add the source code

Add your source code file into the src folder.

./src/hello.c
#include <stdio.h>
int main(void) { printf("Hello World"); return 0; }

Create the Builder App

Create an new file called build.nim inside the src folder.

./src/build.nim
import confy
let hello = Program.new( @["hello.c"], "hello" )
hello.build()

Build and Run the Builder App

note

This step assumes you have Nim installed.
If you don't, please follow the choosenim instructions before continuing.

nim c -r ./src/build.nim

That's it. This last step will build your code as expected.
The resulting binary will be output to the ./bin folder.

What's Next

That's the end of the road.
If your project is simple enough you won't need anything else.

In the real world this is rarely the case.
The Getting Started guide will go into more details about confy and explain how to configure it further.