Skip to main content

Contributing to GarraIA

Thank you for your interest in contributing to GarraIA!

Getting Started​

Prerequisites​

  • Rust 1.97+
  • Git
  • FFmpeg (for voice features)

Setup​

  1. Fork the repository

  2. Clone your fork:

    git clone https://github.com/YOUR_USERNAME/GarraRUST.git
    cd GarraRUST
  3. Build:

    cargo build --workspace
  4. Run tests:

    cargo test --workspace

Development Workflow​

1. Create a Branch​

git checkout -b feature/your-feature
# or
git checkout -b fix/your-fix

2. Make Changes​

Follow the coding standards:

  • Run cargo fmt before committing
  • Run cargo clippy to catch issues
  • Add tests for new features

3. Commit​

Use conventional commits:

git commit -m "feat: add new LLM provider"
git commit -m "fix: resolve memory leak"
git commit -m "docs: update configuration guide"

4. Submit PR​

  1. Push your branch
  2. Open a Pull Request
  3. Fill out the PR template
  4. Wait for review

Project Structure​

crates/
├── garraia-cli/ # CLI entry point
├── garraia-gateway/ # HTTP/WebSocket gateway
├── garraia-config/ # Configuration
├── garraia-channels/ # Messaging channels
├── garraia-agents/ # LLM providers
├── garraia-voice/ # Voice pipeline
├── garraia-db/ # Memory/SQLite
├── garraia-plugins/ # WASM plugins
├── garraia-media/ # Media processing
├── garraia-security/ # Vault/auth
├── garraia-skills/ # Skills system
└── garraia-common/ # Shared types

Coding Standards​

Rust Guidelines​

  • Use cargo fmt for formatting
  • Follow Rust API guidelines
  • Use meaningful names
  • Add documentation for public APIs

Testing​

  • Unit tests in src/
  • Integration tests in tests/
  • Run full test suite before PR

Documentation​

  • Update README if needed
  • Add doc comments to public functions
  • Update docs/ for user-facing changes

Finding Issues​

Commands​

Build​

# Debug build
cargo build

# Release build
cargo build --release

# With plugins
cargo build --release --features plugins

Test​

# All tests
cargo test --workspace

# Single crate
cargo test -p garraia-gateway

# With output
cargo test --workspace -- --nocapture

Lint​

cargo fmt --check
cargo clippy --workspace
cargo deny check

Run​

cargo run --package garraia-cli -- init
cargo run --package garraia-cli -- start

Communication​

License​

By contributing, you agree that your contributions will be licensed under MIT.