Skip to content

Contributing

Guidelines for contributing to Capsa.

Code Style

  • Run cargo fmt before committing
  • All code must pass clippy -D warnings
  • Add tests for new functionality
  • Update documentation for API changes

Pull Request Process

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Ensure CI passes
  5. Submit a pull request

Commit Messages

Use conventional commit format:

feat: add support for virtio-gpu
fix: resolve race condition in vsock connection
docs: update networking guide
test: add integration tests for VM pools

Types

TypeDescription
featNew feature
fixBug fix
docsDocumentation only
testAdding or updating tests
refactorCode change that neither fixes a bug nor adds a feature
perfPerformance improvement
choreBuild process or auxiliary tool changes

Testing Requirements

Before submitting a PR:

  1. Run unit tests: cargo test-linux --lib or cargo test-macos --lib
  2. Run integration tests: cargo test-linux -- --test-threads=1
  3. Run clippy: cargo clippy-linux -- -D warnings
  4. Check formatting: cargo fmt --all -- --check

Documentation

  • Update relevant documentation when changing public APIs
  • Add doc comments for new public items
  • Include examples in doc comments where helpful

Getting Help

  • Open an issue for bugs or feature requests
  • Discuss larger changes in an issue before implementing

Released under the MIT License.