Thank you for your interest in contributing to the Mastermind project! This documentation file will walk you through the setup process and proper linter configurations.
The Mastermind project is licensed under The GNU General Public License v3.0. By contributing to this project, you are agreeing to provide your content under this license as well. In addition, you are agreeing to explicitly grant your patent rights to all users of this project.
For more information, refer to the license
rust
cargo
Installing via rustup
is recommended.
You may also get them from your package manager (note: some distributions may package them separately).
git clone https://github.com/theoforger/mastermind.git
cd mastermind
Run the following command:
cargo build
See: https://github.com/theoforger/mastermind?tab=readme-ov-file#%EF%B8%8F-configure
Alternatively, you can make use of the .env
file. Simply make a copy of example.env and name it .env
cp example.env .env
Then edit .env and provide you preferred configuration.
Before you commit, make sure the following linting/formatting tools using the options below. Commit only when your code is error/warning free.
Run the following command:
cargo fmt
If you don't have clippy
installed already (which is very unlikely). Add it through rustup
:
rustup component add clippy
Then run the following command:
cargo clippy --all-features --all-targets -- -W clippy::all
We recommend RustRover for contributions to this project. It comes with first-party support for both rustfmt
and clippy
. To enable them:
rustfmt
: Open "Settings -> Rust -> Rustfmt". Enable "Use Rustfmt instead of the built-in formatter"clippy
: Open "Settings -> Rust -> External Linters". Set "External tool" toClippy
. Set "Additional arguments" to--all-features --all-targets -- -W clippy::all