Thank you for your interest in contributing to pyproject-fmt-rust! There are many ways to contribute, and we appreciate all of them. As a reminder, all contributors are expected to follow our Code of Conduct.
To work on the project:
- Install Rust (preferably through rustup).
- Clone the repository.
- Build the project and run the unit tests:
cargo test
By contributing to pyproject-rust-format, you agree that your contributions will be licensed under the MIT License.
Thank you for your contributions! If you have any questions or need further assistance, feel free to reach out via GitHub issues.
If you find PyO3 constantly recompiling (such as if you are running
rust-analyser in your IDE and cargo test in a terminal), the problem is that
PyO3 has a build.rs
that looks for Python, and it will recompile if it is run
with a different PATH. To fix it, put the following in .cargo/config.toml
:
[env]
PYO3_PYTHON = "./.venv/bin/python"
And make sure you have a .venv
folder with Python in it. This will ensure all
runs use the same Python and don't reconfigure.