Project Configuration

To compile or work on a project, every project is required to have its own configuration file. This configuration file provides crucial information to the compiler, LSP, and the user alike.

The default project configuration looks something like this:

name = "test_project"
is_library = false
version = "0.0.1"
build_path = "out"
additional_linking_material = []

[dependencies]
Field NameUsage
nameUsed for naming your project. It is also used to specify the library when importing a function.
is_libraryTells the compiler not to search for a main function and enables the project to be imported as a dependency.
versionSpecifies the version of a project. This is used to identify multiple editions of the same dependency.
build_pathTells the compiler where to place the build artifacts.
additional_linking_materialTells the linker which additional files to link the object files with.
featuresSets the enabled features for the project, if it is not library these are ignored.
dependenciesSpecifies the dependencies the project uses.

Config file composition:

Optional fields are marked with *.

name = <string>
is_library = <bool>
version = <version> # This must follow the semver specification.
build_path = <path>
*features = [<feature>, <feature>]
additional_linking_material = [<path>, <path>, ...]

[dependencies]
<dependency name> = { version = <version>, features = [<feature name>, <feature name>, ...] }
<dependency name> = { version = <version>, features = [<feature name>, <feature name>, ...] }
...

Learn more about SemVer here.