- Contributions and pull requests are very welcome, this project can always use extra help
- All contributions must be allowed under the license (
LICENCE.md) - All contributions must abide by the Code of Conduct (
docs/CODE_OF_CONDUCT.md)
- All contributions must be allowed under the license (
- The general process to contribute would be as follows:
- Fork the project, optionally create a branch from that
- Make your change and write a sensible commit message
- Ensure the project builds without any warnings, passes the linter and all workflows pass
- Create a merge request, and follow the template
- The aim of this document is to provide technical information, not be a general how-to guide
-
build,all,tests,debug,library,demo,threads,mathsandlint*support-j[CORE COUNT]make build- Builds the demomake all- Builds the demo and the testsmake tests- Builds the testsmake debug- Runsmake buildin debug modemake library- Buildsbuild/libammonite.somake demo- Builds a demo binary, a working demonstration of the renderermake threads- Builds a test program for the thread poolmake maths- Builds a test program for the mathsmake install- Installslibammonite.soto the system- The install path can be configured, by setting the environment variable
INSTALL_DIR
- The install path can be configured, by setting the environment variable
make headers- Installs Ammonite headers andammonite.pcto the system- The install path can be configured, by setting the environment variable
HEADER_DIR
- The install path can be configured, by setting the environment variable
make uninstall- Removes installed library and headers- Custom install locations must be specified the same way as they were installed
make icons- Createsassets/icons/icon-*.pngfromassets/icons/icon.svgmake lint- Lints the engine and calling code usingclang-tidymake lint_tests- Only lints the test implementations insrc/tests/make lint_all- Lints everything
make clean- Cleans the build area (build/) and default runtime cache (cache/)make cache- Clears the default runtime binary cache, useful if running into issues with caching
-
DEBUG:true / false- Compiles the target in debug modeFAST:true / false- Use a no-error contextARCH:[microarchitecture]- Target a specific microarchitecture, defaults tonativeUSE_LLVM_CPP:true / false- Link againstlibc++instead oflibstdc++USE_SYSTEM:true / false- Use the system copy of Ammonite's headers, library and package config for the client codeCHECK_ADDRESS:true / false- Enables-fsanitize=addressfor runtime memory error checkingCHECK_UNDEFINED:true / false- Enables-fsanitize=undefinedfor runtime undefined behaviour checkingCHECK_THREADS:true / false- Enables-fsanitize=threadfor runtime data race checkingCHECK_TYPES:true / false- Enables-fsanitize=typefor runtime type aliasing violation checkingCHECK_MEMORY:true / false- Enables-fsanitize=memoryfor runtime uninitialised read checkingCHECK_LEAKS:true / false- Enables-fsanitize=leakfor runtime leak checkingBUILD_DIR- Use a different directory for temporary build system filesPREFIX_DIR- Change the base install pathINSTALL_DIR- Installlibammonite.soandammonite.pcto a different locationHEADER_DIR- Install Ammonite headers to a different locationPKG_CONF_DIR- Installammonite.pcto a different location
TIDY- Override default choice forclang-tidy
- To compile in debug mode, use
make debugorDEBUG=true make ...- This enables additional checks and debug output from the engine
- Makes use of
-fsanitize=address,undefinedand-fno-omit-frame-pointer-fsanitize=address,undefinedwill be skipped if explicitly disabled, or incompatible options are used
- It'll also enable graphics API debug warnings, messages and errors
- This will use a debug graphics context, if available
- Each object is compiled with debugging symbols, and
stripis skipped-Ogis used as the optimisation level
- Run
make cleanwhenever swapping between regular and debug builds DEBUG=true make ...can be used on any target, and only rebuilds changed objects- If an initial
make cleanisn't used, the build may fail or produce broken results make cleanisn't required for linting targets, but this doesn't mean that regular and debug linting passes can be done in parallel
- If an initial
- Spellings should use British English for both documentation and code
- New or modified build system targets need to be documented in the "Build system" section
- Non-development related targets should also be documented in
README.md
- Non-development related targets should also be documented in
- Any scripts should be placed in
scripts/ - Icons should be regenerated using
make icons - Header includes should use the following order:
- Standard library headers
- C++ library headers
- C library headers, in an
extern "C" {} - The header the file is providing symbols for
- Internal headers at the same level / deeper than the current file
- Internal headers at a higher level than the current file
- For headers, the header with the corresponding public interface
- Within each category the headers should be ordered alphabetically
- Any internal symbols should be placed in a
namespace AMMONITE_INTERNAL ammonite {}- Symbol declarations should happen inside a nested
namespace internal {}
- Symbol declarations should happen inside a nested
- Any exposed symbols should be placed in a
namespace AMMONITE_EXPOSED ammonite {}