Thanks for your interest in contributing to grim-rs! This document describes how we work and what is required for contributions to be accepted.
- grim-rs targets Wayland compositors that support
zwlr_screencopy_manager_v1. - The library is Rust-first and aims for a clean public API with minimal dependencies and predictable behavior.
- Fork the repo and create a feature branch.
- Make changes with clear commit messages.
- Add or update tests.
- Open a pull request.
- Development and profiling require a running Wayland session.
- Tests must live in
tests/and be placed in a file that matches what you are testing. - Any new public API must be justified (why it is needed and why it belongs in the public surface).
- Any bug fix must be tied to an Issue and include a link to it.
- Every pull request must reference the related Issue.
- For new functionality not currently present, create an Issue first and discuss before implementation.
Before starting any work:
- Open an Issue for new features.
- Open an Issue for bug fixes, including reproduction steps and environment.
- Link the Issue in your PR description.
Changes to the public API require:
- A short justification in the PR.
- A clear explanation of alternatives considered.
- Updates to docs and examples if behavior changes.
- A migration note if the change is breaking.
- All tests must be under
tests/. - Place tests in the file that matches the area you are testing.
- Keep tests deterministic; avoid environment-specific assumptions.
- Run
cargo testlocally before opening a PR.
Before opening a PR:
- Read
doc/profiling_manual.md. - Run the required profiling runs and collect the outputs described there.
- You may use the existing benches or add your own profiling harness if needed.
- Include a short summary of results in the PR.
- Update
README.mdwhen user-facing behavior changes. - Update
CHANGELOG.mdfor any notable change. Example:### Fixed - **Short summary**: Clear description of what changed and why. Close #123, [@username](link). - For breaking changes, add or update
MIGRATION.md.
- Follow the existing code style and structure.
- Avoid new
unsafeunless absolutely required; explain why in the PR. - Prefer explicit error handling over
unwrap()orexpect()in production code. - Keep functions focused and readable.
- Linked Issue in the PR description.
- Tests added or updated in
tests/. -
cargo testpasses locally. - Docs and changelog updated where needed.
- Public API changes justified (if applicable).
- Profiling results included (see profiling manual).
- Keep PRs focused and small when possible.
- Be explicit about tradeoffs and alternatives.
- If in doubt, open an Issue and ask before implementing.
- If you are stuck, you can email me at vremyavnikuda@protonmail.com with your question, and I will reply when possible.
Thank you for contributing to open source and supporting grim-rs!