Thank you for your interest in contributing to Voxtype! This document provides guidelines for contributing.
- Report bugs - Open an issue describing the bug
- Request features - Open an issue describing the feature
- Submit code - Fork, make changes, and submit a pull request
- Improve documentation - Help make the docs clearer
- Help others - Answer questions in discussions
- Rust (stable, 1.70+)
- Linux with Wayland
- Build dependencies:
- Arch:
sudo pacman -S base-devel clang alsa-lib - Debian:
sudo apt install build-essential libclang-dev libasound2-dev - Fedora:
sudo dnf install @development-tools clang-devel alsa-lib-devel
- Arch:
# Clone the repo
git clone https://github.com/peteonrails/voxtype
cd voxtype
# Build debug version (faster compilation)
cargo build
# Build release version
cargo build --release
# Run tests
cargo test
# Run with verbose output
cargo run -- -vv- Follow Rust conventions (use
cargo fmtandcargo clippy) - Write clear commit messages
- Add tests for new functionality
- Update documentation as needed
Run this before pushing a branch. It mirrors the parallel jobs that feed the
ci-success aggregator and catches the common failures locally:
cargo fmt && cargo clippy --all-targets --no-deps -- -D warnings && cargo testIf any step fails, fix it before pushing. CI runs the same checks and will block the merge otherwise.
Voxtype uses a three-branch flow:
devis the default branch and the base for all PRs. Day-to-day work merges here onceci-successpasses.rc/x.y.zbranches are cut fromdevfor release candidates. Pushing to anrc/*branch triggers the full build matrix (Linux variants and macOS).mainonly receives merges from a greenrc/x.y.zbranch and is taggedvX.Y.Zat release time.
Branch protection requires:
dev: theci-successaggregator check (which depends on the parallelfmt,clippy, andtestjobs).main:ci-success,linux-ci-success, andmacos-ci-success.
Open PRs against dev. Draft PRs are encouraged while CI is red; mark Ready
for Review once ci-success is green.
- Create an issue describing the bug
- Fork the repository
- Create a branch from
dev:git checkout -b fix/description origin/dev - Make your fix
- Test thoroughly (run the local pre-push smoke above)
- Submit a pull request against
devreferencing the issue
- Open an issue to discuss the feature first
- Wait for feedback before investing significant time
- Fork and create a branch from
dev:git checkout -b feature/description origin/dev - Implement the feature
- Add tests and documentation
- Submit a pull request against
dev
Use clear, descriptive commit messages:
type: short description
Longer description if needed. Explain what and why,
not how (the code shows how).
Fixes #123
Types: fix, feat, docs, style, refactor, test, chore
Every commit in a pull request must be signed, and GitHub must show it as Verified. Pull requests with unsigned or unverified commits are not merged.
If this is your first pull request to voxtype and any of its commits are unsigned or unverified, the pull request is closed automatically with a comment that links here. Sign the commits and open a new pull request. Nothing else about your change needs to be different.
With SSH, using the key you already push with:
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign trueThen add the same public key on GitHub under Settings > SSH and GPG keys > New SSH key, with the key type set to Signing Key.
With GPG:
gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long # copy the key ID
git config --global user.signingkey <KEY_ID>
git config --global commit.gpgsign true
gpg --armor --export <KEY_ID>Then paste the exported key on GitHub under Settings > SSH and GPG keys > New GPG key.
Either way, the email on your commits must be a verified email on your GitHub account, or GitHub shows the signature as Unverified.
git rebase --exec 'git commit --amend --no-edit -S' origin/dev
git log --show-signature origin/dev..HEAD # every commit should show a good signature
git push --force-with-leaseIf you're already inside a file to fix a bug or add a feature, it's fine to clean up what you're touching. The rules are short.
Stay inside the files your change already touches. If you notice something ugly in a neighbouring module, open an issue and link it from your PR; don't expand the diff. Adjacent cleanup is how PRs grow until they don't ship.
Wait for the third call site before extracting a helper. Two might be a coincidence. The same shape happening to recur in places that answer different questions is also a coincidence; don't merge those. Genuine duplication of a fact across files (the same name spelled out repeatedly, the same parse logic copy-pasted) is the case worth fixing.
Put the cleanup in its own commit, separate from the behaviour change. It makes the PR easier to review and easier to revert in pieces if needed. If you're refactoring something with no test coverage, write a small test that pins current behaviour before you change anything.
If your cleanup is going to add more than half a day of work, stop and split. Ship the feature; do the refactor as a follow-up PR. Don't invent abstractions for a single implementation, and don't split a file just because it's long. File splits and other structural decisions are the maintainer's call.
If you're not sure whether a cleanup belongs in your PR, ask in the description before doing it. Skipping a refactor is always cheaper than reverting one.
Please read our Code of Conduct before contributing. We are committed to providing a welcoming and positive experience for everyone.
I typically respond to issues and PRs within 48-72 hours. For urgent bugs affecting core functionality, mention @peteonrails in your issue.
Open a discussion at https://github.com/peteonrails/voxtype/discussions
We want to hear from you! Voxtype is a young project and your feedback helps make it better.
- Something not working? If Voxtype doesn't install cleanly, doesn't work on your system, or is buggy in any way, please open an issue. I actively monitor and respond to issues.
- Like Voxtype? I don't accept donations, but if you find it useful, a star on the GitHub repository and/or a vote on the AUR package would mean a lot!
If you submit code that is incorporated into Voxtype, whether I modify it or accept it unchanged, I will credit you and list you as a contributor. If, for some reason, you do not want this, please let me know. I'll make every effort to:
- Include your commits with your github username
- Add you to the README
- Add you to the website pages
Bonus points to you if you make this easy for me by including those changes in your pull request. It's not required, but it is appreciated.
By contributing, you agree that your contributions will be licensed under the MIT License.