Thank you for considering to contribute to numem!
Numem, unlike other packages under the Inochi2D umbrella is far more strict in what should and should not be added to the codebase. This is to ensure API stability for consumers of the numem API.
- Do not add any external dependencies.
- Only include essential features for memory managment.
- New features should have associated unittests under the tests directory.
- Be sure to mark functions with attributes appropriately.
- Fundamentally unsafe code should not be marked trusted!
- Follow the code style of the rest of the project.
Reported bugs should have clear steps for reproduction, bonus if you provide a minimal dustmite example.
Most features that may be requested will likely be rejected; you may want to submit them to nucore instead. numem is meant to be minimal in size to decrease the surface of how much may break.
If you'd like to make a feature pull-request please bring up a suggestion via Issues first, Bugfixes will only be merged if all of the tests pass. If a pull-request is a work-in-progress, please mark it as a Draft.
Lower level primitives (that optionally are exported to C) should be named using snake_case
, SCREAMING_SNAKE_CASE
in the case of public constants and single-value enums.
Higher level functionality should follow the phobos style guidelines.
Symbols should be documented using DDOC syntax. Besides sections in the official ddoc documentation; we also use a couple of extra ones when needed:
Section | Meaning |
---|---|
Memorysafety |
Describes how memory safety the feature is in question; safety is determined in terms of how safe it is for the end user. |
Threadsafety |
Describes how safe it is to use a function in a multi-threaded context. |
Notes |
Any additional notes the user of the symbol should be aware of. |
Please appropriately document new functions added.
NOTE: Some functions carried over from older versions of numem may not have gotten their documentation updated yet, they are a temporary exception and will be fixed with time.