Thank you for your interest in contributing to localup! This guide will help you get started.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Code Style
- Testing
- Submitting Changes
- Issue Guidelines
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
- Fork the repository on GitHub
- Clone your fork locally
- Create a branch for your changes
- Make your changes with tests
- Submit a pull request
- Rust 1.90.0 or later (install via rustup)
- OpenSSL (for TLS certificate generation in tests)
- Bun (for web applications in
webapps/)
# Clone your fork
git clone https://github.com/YOUR_USERNAME/localup.git
cd localup
# Build the workspace
cargo build
# Build a specific crate
cargo build -p localup-client# Run all tests
cargo test
# Run tests for a specific crate
cargo test -p localup-proto
# Run tests with output
cargo test -- --nocaptureUse descriptive branch names with prefixes:
feat/- New features (e.g.,feat/websocket-compression)fix/- Bug fixes (e.g.,fix/reconnection-timeout)docs/- Documentation changes (e.g.,docs/api-reference)chore/- Maintenance tasks (e.g.,chore/update-dependencies)refactor/- Code refactoring (e.g.,refactor/transport-layer)
We use Conventional Commits. Each commit message should be structured as:
type(scope): description
[optional body]
[optional footer(s)]
Types: feat, fix, docs, style, refactor, test, chore, perf, ci
Examples:
feat(transport): add HTTP/2 transport support
fix(client): handle reconnection on certificate rotation
docs(readme): add WebSocket transport example
test(router): add SNI routing edge case tests
A pre-commit hook validates commit message format automatically.
- Format with
cargo fmtbefore every commit - No clippy warnings allowed (
cargo clippy -- -D warnings) - Use
thiserrorfor custom error types - Use
tokio::syncprimitives (neverstd::sync) - Follow existing patterns in the codebase
Before submitting a PR, run these commands (they match our CI pipeline):
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo testAll three must pass. PRs with failing CI will not be reviewed.
- Add rustdoc comments (
///) to all public types and functions - Include code examples in doc comments where helpful
- Update README.md if your change affects user-facing behavior
- All new features must include unit tests
- All new public APIs must include integration tests
- Critical paths should have >90% coverage
- Use
#[tokio::test]for async tests
crates/localup-foo/
src/
lib.rs # Unit tests in #[cfg(test)] mod tests {}
tests/
integration.rs # Integration tests
- Happy path: Basic successful operation
- Error cases: Invalid input, network failures, timeouts
- Edge cases: Empty input, boundary values, concurrent access
- Recovery: Graceful handling after errors
- Update documentation for any user-facing changes
- Add or update tests as needed
- Ensure all CI checks pass
- Fill out the PR template completely
- Request review from maintainers
- Keep PRs focused -- one feature or fix per PR
- Provide context in the description (what, why, how)
- Link related issues (e.g., "Closes #42")
- Include screenshots or terminal output for UI/behavior changes
- Be responsive to review feedback
- At least one maintainer approval is required
- CI must pass before merging
- Reviewers may request changes -- this is normal and constructive
- We aim to review PRs within 1 week
Use the bug report template and include:
- localup version (
localup --version) - Operating system and architecture
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs (with
--log-level debug)
Use the feature request template and include:
- Problem description (what pain point does this solve?)
- Proposed solution
- Alternative approaches you considered
- Impact on existing functionality
Look for issues labeled good first issue -- these are ideal starting points for new contributors.
The project is organized as a Rust workspace with focused crates. See CLAUDE.md for detailed architecture documentation including:
- Workspace structure and crate responsibilities
- Protocol flow and multiplexing architecture
- Key design decisions
- Performance targets
By contributing to localup, you agree that your contributions will be licensed under the project's dual MIT/Apache-2.0 license.