Skip to content

Commit c12e5f1

Browse files
committed
Add note about rust code to the contributing guide
1 parent 356627b commit c12e5f1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

CONTRIBUTING.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ To set up `grimp` for local development:
6161

6262
6. Submit a pull request through the GitHub website.
6363

64+
Rust code
65+
---------
66+
67+
When working with the rust code (in the ``rust/`` directory):
68+
69+
* Run tests with ``cargo test --no-default-features``.
70+
The ``--no-default-features`` flag is needed to due to `this PYO3 issue <https://pyo3.rs/main/faq#i-cant-run-cargo-test-or-i-cant-build-in-a-cargo-workspace-im-having-linker-issues-like-symbol-not-found-or-undefined-reference-to-_pyexc_systemerror>`_.
71+
* Run `clippy <https://doc.rust-lang.org/clippy/index.html>`_ (a linter for rust) with ``cargo clippy --all-targets --all-features -- -D warnings``.
72+
It's often possible to apply automatic fixes to clippy issues with the ``--fix`` flag e.g. ``cargo clippy --all-targets --all-features --fix --allow-staged``.
73+
6474
Pull Request Guidelines
6575
-----------------------
6676

0 commit comments

Comments
 (0)