Thank you for your interest in contributing to otari!
We're building a simple, unified Rust interface for working with LLMs through the Otari gateway, and we welcome contributions from developers of all experience levels.
Before creating a new issue or starting work:
- Search existing issues for duplicates
- Check open pull requests to see if someone is already working on it
- For bugs, verify it still exists in the
mainbranch
For significant changes, please open an issue before starting work:
- API changes or new public methods
- Breaking changes
- New dependencies
- Rust 1.83 or newer (
rustup update stable) - Git
- A running Otari gateway instance for integration tests
# 1. Fork the repository on GitHub
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/otari-sdk-rust.git
cd otari-sdk-rust
# 3. Add upstream remote
git remote add upstream https://github.com/mozilla-ai/otari-sdk-rust.git
# 4. Build the project
cargo build
# 5. Run tests
cargo test
# 6. Run lints
cargo clippy --all-features --all-targets -- -D warnings
# 7. Format code
cargo fmtCreate a .env file in the project root (this file is gitignored):
OTARI_API_KEY=your_key_here
OTARI_API_BASE=http://localhost:8000Or export environment variables:
export OTARI_API_KEY="your_key_here"
export OTARI_API_BASE="http://localhost:8000"Never commit API keys!
Always work on a feature branch:
# Update your main branch
git checkout main
git pull upstream main
# Create a new branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-descriptionBranch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code improvements
We use strict Clippy lints. Before committing:
# Format code
cargo fmt
# Run clippy
cargo clippy --all-features --all-targets -- -D warnings
# Run tests
cargo test --all-featuresEvery change needs tests!
- New features: Add tests covering happy path and error cases
- Bug fixes: Add a test that reproduces the bug
Tests are organized as:
src/- Unit tests in#[cfg(test)]modulestests/- Integration tests
Update documentation when you:
- Add a new feature
- Change existing behavior
Documentation to update:
- Doc comments (
///) on public items (required) - README.md if changing core functionality
- Examples in
examples/directory
Write clear, descriptive commit messages:
# Good
git commit -m "feat: add batch operation support"
git commit -m "fix: handle streaming disconnect gracefully"
# Less helpful (avoid)
git commit -m "fix bug"
git commit -m "update"git add .
git commit -m "feat: add support for new feature"
git push origin feature/your-feature-name- Go to the repository on GitHub
- Click "New Pull Request"
- Select your fork and branch
- Fill out the PR description completely
- Ensure CI passes
- Initial Response: Within 5 business days
- Simple Fixes: Usually merged within 1 week
- Complex Features: May take 2-3 weeks
- Maintainers will provide constructive feedback
- Address comments with new commits
- CI must pass before merge
New to the project? Look for issues labeled:
good-first-issue- Perfect for newcomershelp-wanted- Community contributions welcomedocumentation- Often accessible for beginners
- Fix a typo in documentation
- Add a test case
- Improve error messages
- Add an example
# Build
cargo build
cargo build --all-features
# Test
cargo test # All tests
cargo test --lib # Unit tests only
cargo test --test '*' # Integration tests only
cargo test test_name # Specific test
# Lint
cargo clippy --all-features --all-targets -- -D warnings
# Format
cargo fmt
cargo fmt --check # Check only
# Documentation
cargo doc --all-features --no-deps --open
# Run example
cargo run --example gateway_completion- Open a GitHub Issue for bugs or feature requests
- Start a Discussion for questions
We're excited to have you contribute!
License: By contributing, you agree that your contributions will be licensed under the Apache License 2.0.