Thank you for wanting to contribute to nmrs!
I'm fairly accepting to all PR's, only with a couple caveats:
- Do not submit low-effort or purely LLM generated code. If you absolutely must, please disclose how you used AI otherwise I will close the PR.
- Please try to (when possible) contribute to an issue. For smaller changes with no existing issue, a PR is fine but for larger changes, please open an issue first.
To run or develop nmrs you need:
- Rust (stable) via
rustup - A running
NetworkManagerinstance
I also provide a Dockerfile you can build if you don't use Linux and use macOS instead.
To build the image:
docker build -t nmrs-lib .To run tests:
docker compose run testTo run an interactive shell:
docker compose run shellIf you just want quick builds/tests without the full NetworkManager environment:
docker run --rm nmrs-lib cargo test -p nmrs --lib
docker run --rm -it -v $(pwd):/app nmrs-lib # mounts local changesIf you decide to run the shell, ensure you run all commands from within the nmrs directory, not root.
cargo test -p nmrs # run library tests
cargo build -p nmrs # build the library
cargo check # you get the point...If the respective branch for a PR goes out of sync, I prefer you rebase. I've exposed this setting for you to to automatically do so as a contributor on any PR you open.
Make your commit messages at least slightly meaningful. I don't really care much about the format, but please try to be descriptive to the reader.
A good example:
fix(#24): fixed bug where something was happening
All tests must pass before a merge takes place.
sudo systemctl start NetworkManagercargo test --all-featuresThese require WiFi hardware. Please make sure you run this locally before your PR to ensure everything works.
cargo test --test integration_test --all-featuresIf you do not have access to WiFi hardware (for whatever odd reason that is), you can do something like this:
sudo modprobe mac80211_hwsim radios=2
cargo test --test integration_test --all-features
sudo modprobe -r mac80211_hwsimNote
This method only works on linux
All contributions fall under the MIT License.