Thank you for considering contributing to Anjay Lite!
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
Following these guidelines shows that you value the time and effort of the AVSystem team maintaining and developing this project, which is released under a source-available dual license. While Anjay Lite is an AVSystem product, we welcome community contributions, suggestions, and improvements—and we aim to provide constructive feedback and support throughout the contribution process.
If you find a security vulnerability, do NOT open an issue! Please email opensource@avsystem.com instead. We will address the issue as soon as possible and will give you an estimate for when we have a fix and release available for an eventual public disclosure.
Use GitHub issue tracker for reporting other bugs. A great bug report should include:
- Affected library version.
- Platform information:
- processor architecture,
- operating system,
- compiler version.
- Minimal code example or a list of steps required to reproduce the bug.
- In case of run-time errors, logs from
strace,valgrindand PCAP network traffic dumps are greatly appreciated.
If you think some feature is missing, or that something can be improved, do not hesitate to suggest how we can make it better! When doing that, use GitHub issue tracker to post a description of the feature and some explanation why you need it.
If you never submitted a pull request before, take a look at this fantastic tutorial.
- Fork the project.
- Work on your contribution - follow guidelines described below.
- Push changes to your fork.
- Make sure all
make checktests still pass. - Create a pull request.
- Wait for someone from Anjay Lite team to review your contribution and give feedback.
All code should be fully C99-compliant and compile without warnings under gcc and clang. Be sure you have enabled extra warnings by using cmake -DANJ_WITH_EXTRA_WARNINGS=ON. Compiling and testing the code on multiple architectures (e.g. 32/64-bit x86, ARM, MIPS) is not required, but welcome.
- Do not use GNU extensions.
- Use
UPPER_CASEfor constants andsnake_casein all other cases. - Prefer
staticfunctions. Use_anj_prefix for private functions shared between translation units andanj_prefix for types and public functions. - Do not use global variables. Only constants are allowed in global scope.
- When using bitfields, make sure they are not saved to persistent storage nor sent over the network - their memory layout is implementation-defined, making them non-portable.
- Avoid recursion - when writing code for an embedded platform, it is important to determine a hard limit on the stack space used by a program.
- Include license information at the top of each file you add.