Contributing to Exonum
Install Rust and mandatory dependencies according to our installation guide, then you can build the project and run the tests:
git clone https://github.com/exonum/exonum cd exonum cargo test --all
Finding something to fix or improve
The good first issue
Notice that the repository uses a set of linters for static analysis:
You can set up and run these tools locally (see Travis script for the details).
Generally, we follow common best practices established in the Rust community, but we have several additional conventions:
Create as minimal pull request as possible: they are easier to review and integrate.
Additionally, we merge pull requests using the "squash and merge" strategy, so feel free to merge
masterbranch instead of rebasing.
It is convenient to use
debug!when you develop some feature and are only interested in your logging output.
_in public APIs, instead use full variable names and
Public method should be documented, but meaningful parameter names are also helpful for better understanding.
Prefer nested imports whenever possible.
Don't try to minimize imports scope (for example don't put it inside a function), place them at the beginning of the file.
::in the type names (for example
::std::path::Path), instead import a type and use a shorter form:
// Import type: use std::path::Path; // Use it: let path = Path::new("...");
Modules and imports (
use) should be in the following order:
- Reexporting (
- Public modules (
- Imports (
- Third-party libraries.
- Standard library.
- Internal modules (