You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

998 B

Contributing to Diplonat

Development guidelines

Code formatting

Our CI pipeline features a verification of the code format, using rustfmt.

Installing rustfmt

You must install a very recent version of rustfmt through rust nightly

To install:

rustup toolchain install nightly-x86_64-unknown-linux-gnu
rustup component add rustfmt --toolchain nightly


To run on Diplonat, launch the following in the root directory:

cargo +nightly fmt

This will format the whole repository using the settigs defined in .rustfmt.toml.

Auto-format code

You can automate formatting in a number of ways:

Setup your IDE to use rustfmt.

Setup a git hook to run rustfmt before each commit:

cat <<EOF > .git/hooks/pre-commit

cargo +nightly fmt
chmod +x .git/hooks/pre-commit