2.6 KiB
Contribution guidelines
Firstly, thank you for your interest in contributing to this project! This project is powered by the community and relies on hackers across the globe to report bugs, send suggestions and contribute code to move this project forward.
You can see a list of contributors here
Ways to contribute
Coding guidelines 👩💻 👨💻
Special comments
FIXME(@<username>)
: Use this when you have made an implementation that can be improved in the future, such as improved efficiencyHACK(@<username>)
: Use this when the code you are using a temporary workaroundTODO(@<username>)
: Use this when you have kept something incompleteUNSAFE(@<username>)
: Use this to explain why theunsafe
block used is safe
Comment style
We prefer to use a 'mixed' commenting style: a cross between the C and C++ styles. Generally, if a comment can be explained in one-line, then follow the C++ commenting style. In other cases, use the C style.
Formatting
- All Rust code should be formatted using
rustfmt
Parts of the project
ci
,.github
: CI scripts (which, under normal circumstances, don't need to be modified)cli
: Source fortsh
which is the command-line client for TDBexamples
: Example configuration fileslibtdb
: This contains functions, structs, ... used by both thecli
and theserver
: Source for the main database servertdb
tdb-bench
: The source for the benchmarking tool resides heretdb-macros
: The source for custom compiler macros used by TerrabaseDB
Jargon
Each project has its own jargon — and so do we!
- actiondoc and actions docs : This refers to the
actions.jsonc
file, which is used by the TerrabaseDB documentation website for automatically building documentation for the actions
Branches
The next
branch is the kind of stable branch which contains the latest changes. However, for most purposes, you should always download sources from the tags. Usually, when a feature is worked on, the work will be done on a separate branch, and then it will be merged into next.
Steps
- Fork the repository
- Make your changes and start a pull request
- Sign the CLA (if you haven't signed it already)
- One of the maintainers will review your patch and suggest changes if required
- Once your patch is approved, it will be merged into the respective branch
- Done, you're now one of the contributors 🎉
Testing locally
- Install rust (stable)
- Run
cargo build --verbose && cargo test --verbose
- That's it!