Skip to content

Configuration reference

James Tai edited this page Jun 27, 2021 · 6 revisions

The configuration is in TOML and should be located in Coman.toml at the root of the project folder.

You can find the default configuration in src/run/default_coman.toml.

Here is the list of fields at the root of the configuration. These fields should not be in any table (like [languages.cpp]).

Field Type Default Description
src_dir string src Name of source folder
test_dir string test Name of test folder
build_dir string build Name of build folder
soft_timeout integer 2000 Milliseconds before test is counted as timeout
hard_timeout integer 5000 Milliseconds before program is terminated
languages [string: language] [] Mapping from file extensions to languages

For each language, you may have the following fields:

Field Type Default Description
compile [string] [] command to compile with optimizations
compile_debug [string] [] command to compile for debugging
run [string] [] command to run the program
debug [string] [] command to run the debugger

When a program is run or tested (any command apart from coman debug), then coman performs the following steps:

  1. Run the compile command. If it is empty, then the source file is simply copied to the binary location.
  2. Run the run command. If it is empty, then the compiled binary is executed directly.

If a program is debugged (coman debug), then coman performs the following steps:

  1. Run the compile_debug command. If it is empty, then the compile command is run instead. If that is also empty, then the source file is copied to the binary location.
  2. Run the debug command. If it is empty, then coman aborts.

See the default configuration (above) for examples.

Clone this wiki locally