Thanks for wanting to contribute!
This document explains how to propose changes (bug fixes, new features, documentation, tests) in a way that improve code quality.
- Read the
README.mdand any project documentation. - Search existing issues and pull requests, your bug or idea may already be discussed.
- For large changes (major features, big refactors) open an issue or discussion first to agree on the approach.
Both bug reports and feature request, big or small, are welcome.
Before submitting a feature request, please check if an open issue already exists. If this is not the case, submit a feature request. Describe your use case, why you need this feature and why this feature is important for replay.
Before filing a bug report, please check if an open issue already exists. If this is not the case, submit a new bug report. If you're not sure if something is a bug or not, feel free to file a bug report anyway.
GitHub Pull Requests (PRs) are the main way to contribute. We use the fork-and-pull model: you push changes to your personal fork, then open a PR into this repository.
- Search existing and closed PRs maybe someone already worked on the same idea. If so, you can help by reviewing, testing, or reviving it.
- Keep PRs focused: smaller PRs are easier to review and get merged faster. If your contribution spans multiple concerns, split it into several PRs.
- Fork the repository.
- Create a branch with a clear name, e.g.
fix/bug-short-descorfeat/add-xyz. - Make your changes and include tests where appropriate.
- Format code with
cargo fmt; use the pre-commit hook to automate this. - Run
cargo clippyandcargo testlocally to fix issues before opening a PR. - Commit using the required conventions.
- When addressing review feedback, prefer
git commit --fixup <commit>so reviewers see incremental changes. - Don’t squash or rewrite history after review — wait until a maintainer asks you to.
- When addressing review feedback, prefer
- Open a Pull Request against the main branch (usually
mainormaster) and include:- Purpose of the change.
- Implementation details and rationale.
- Possible risks, regressions, and semantic-versioning considerations.
- How to test the change locally.
- Leave “Allow edits from maintainers” enabled — this helps maintainers finalize your PR if small adjustments are needed.
- Respond quickly to comments to avoid stalled PRs.
- If your PR hasn’t received attention in a while, you may politely ping a maintainer or mention it in Discussions.
- I have read the
READMEand searched existing issues/PRs. - My PR targets the correct branch.
- I wrote or updated tests where necessary.
- I added rustdoc comments for public items if needed.
-
cargo fmtandcargo testpass locally. -
cargo clippypasses locally (no warnings). - Commit messages follow the required format.
- I described the purpose of the PR and how to test it.
- Format code with
rustfmt(cargo fmt) before committing. The pre-commit hook will do this automatically if enabled. - We treat warnings as errors in CI. Fix warnings locally before opening a PR.
- Prefer small, focused PRs and avoid adding unnecessary dependencies.
We provide a pre-configured set of Git hooks shipped in the repository under .githooks/ to help contributors keep the codebase consistent. To enable them locally run:
# enable the repository-provided hooks
git config core.hooksPath .githooksWhat the hooks do (recommended defaults)
pre-commit: automatically runscargo fmt --alland stages formatted files so commits are properly formatted.
Note: hooks are optional for contributors but strongly recommended. Don’t worry if you forget — CI will catch it for you.”
This repository enforces a simple conventional-commit-like subject format in CI. The accepted types are:
feat, fix, build, chore, doc, style, refactor, test, perf
Subject format:
<type>(optional-scope)?: <short description>
Examples:
feat(auth): add token refreshfix: handle invalid inputdocs: improve README examples
When addressing feedback from a code review, do not rewrite history. Instead, create a fix commit that clearly describes what was fixed:
git commit -m "fix:<description of the fix>"Otherwise the history of review changes is lost and for large PRs, it makes it difficult for the reviewer to follow them. It might also happen that you introduce regression and won't be able to recover them from previous commits.
Once reviewers approve your changes, follow these steps to ensure no merging conflict with main:
git fetch origin
git rebase origin/mainThen resolve potential conflicts with main and then push your branch with:
git push --force-with-leaseFinally, use a squash merge in github to cleanly integrate your commits.
Replay has a test suite that you can run with cargo test. Ideally, we'd like pull requests to include tests where they make sense. For example, when fixing a bug, add a test that would have failed without the fix.
After you've made your change, make sure the tests pass in your development environment.
This project uses a GitHub Actions workflow (rust-ci) that runs on pushes to main/master and on pull requests. CI enforces commit message format, code formatting, lints (warnings are treated as errors), documentation checks and the test suite across configured platforms.
Please ensure checks (format, lints, tests, docs) pass locally before opening a PR — CI will still run and may catch platform-specific issues.
Contributions to docs and examples are highly appreciated:
- Update README.md for changes that affect the user experience (UX).
- Add examples under
examples/when appropriate.
Rustdoc comments (///) are strongly encouraged for public APIs.
Thanks for contributing — code, issues, docs, and tests make the project better for everyone!