Contributing
Parts of the code are generated using code generation tools. This should, in theory, allow for easier maintenance, especially if upgrading the underlying SunVox library to a newer version. This way parts of the code can be regenerated automatically.
This is the reason why there is a special "SUNSHARP_GENERATION" constant and a build configuration named "Generation". When running the code generation project, the generated code is automatically updated. The same generators are also used in the unit tests to verify that the generated code is correct and up to date.
Because the CodeGeneration project depends on the main SunSharp project, it is not possible to run it as a pre-build step. Instead, it needs to be run manually whenever the generated code needs to be updated. This is done to avoid potential issues with build order and dependencies. Additionally, this also causes the need for preprocessor directives to exclude parts of code that depend on, or that are generated by, the CodeGeneration project when building in the "Generation" configuration.
Additionally, to reduce runtime overhead, the code is built with a struct for a wrapper around the C interface in release mode, and an interface in debug mode. This mainly affects the object-oriented API, as the functional API is mostly simple function calls.
Pull Requests
There is a github workflow that runs on pull requests to validate the changes. It runs the unit tests, integration tests, builds the solution, and builds the documentation.