We want to make contributions as easy and transparent as possible.
We actively welcome your pull requests.
- Fork the source repo and create your branch from
main
. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes
- Make sure your code lints
The codebase uses the Clippy linter to ensure that common mistakes are caught. To install follow the instructions on the Clippy repository. We make use of a cargo alias (defined in .cargo/config) which sets some project-wide lints. To run the linter locally you can use the following command:
cargo xclippy
To ensure that the codebase is following standard formatting properties, we use Rustfmt. To run the formatter locally you can use the follow command:
cargo fmt --all
The above command will format and apply the changes directly. If you want to just
see the formatter recommendations, just run with the --check
property:
cargo fmt --all -- --check
The derive_builder crate has been used to auto-generate builders (following the builder design pattern) for structs. Instead of having to write (lots) of boilerplate code to create a builder, this is offered by the derive_builder and is the recommended way to create builders for this repo. Examples can be found within the repo and on the crate docs as well.
One thing to note is that Narwhal uses snapshot testing for configs. See the beginning of the file config/tests/config_tests.rs for background and instructions if your PR breaks the test.
We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
By contributing, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.