Thank you for your interest in contributing to Inferno! This guide will help you get started.
- Use the issue tracker to report bugs
- Search existing issues before creating a new one
- Use the issue templates for bug reports and feature requests
- Provide as much detail as possible, including:
- Operating system and version
- Rust version (
rustc --version) - Command that caused the issue
- Expected vs actual behavior
- Log output (with
RUST_LOG=debug)
- Open a discussion first for major features
- Use the feature request issue template
- Explain the use case and why it would benefit Inferno users
- Consider if it fits with Inferno's goal of being a local AI inference platform
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Implement your changes with tests
- Run the full test suite:
./verify.sh - Commit with a clear message
- Push and create a Pull Request
- Rust 1.70+: Install via rustup
- Git: For version control
- Docker (optional): For testing containerized deployments
git clone https://github.com/ringo380/inferno.git
cd inferno
# Build in development mode
cargo build
# Run tests
cargo test
# Run full verification (build + test + lint + audit)
./verify.sh# Install development tools
cargo install cargo-watch # Auto-rebuild on changes
cargo install cargo-audit # Security audits
cargo install cargo-tarpaulin # Code coverage
# Optional: Install pre-commit hooks
cargo install pre-commit
pre-commit install- Use
cargo fmtto format code - Use
cargo clippyto catch common issues - Follow Rust naming conventions
- Write self-documenting code with clear variable names
- Add comments for complex logic or algorithms
- Use
anyhow::Resultfor application errors - Use
thiserrorfor library errors - Provide helpful error messages with context
- Don't panic in library code (use
Resultinstead)
- Write unit tests for all public functions
- Add integration tests for complex workflows
- Use
#[cfg(test)]for test-only code - Mock external dependencies in tests
- Aim for >80% code coverage
- Document all public APIs with rustdoc comments
- Include examples in documentation
- Update relevant documentation files
- Add entries to CHANGELOG.md for user-facing changes
inferno/
├── src/
│ ├── backends/ # AI model backends (GGUF, ONNX)
│ ├── api/ # HTTP and WebSocket APIs
│ ├── cli/ # Command-line interface
│ ├── tui/ # Terminal user interface
│ ├── cache.rs # Caching system
│ ├── config.rs # Configuration management
│ └── lib.rs # Library entry point
├── tests/ # Integration tests
├── examples/ # Usage examples
├── docs/ # Additional documentation
└── scripts/ # Build and deployment scripts
# Unit tests
cargo test
# Integration tests
cargo test --test integration_tests
# Specific test
cargo test test_gguf_backend
# With logging
RUST_LOG=debug cargo test -- --nocapture- Unit Tests: Fast, isolated tests for individual functions
- Integration Tests: Test component interactions
- Performance Tests: Benchmark critical paths
- End-to-End Tests: Full workflow testing
#[cfg(test)]
mod tests {
use super::*;
use tempfile::TempDir;
#[tokio::test]
async fn test_model_loading() {
let temp_dir = TempDir::new().unwrap();
let model_manager = ModelManager::new(temp_dir.path());
// Test implementation
assert!(model_manager.list_models().await.is_ok());
}
}- Backend Improvements: Enhance GGUF/ONNX implementations
- Performance: Optimize inference speed and memory usage
- Documentation: Improve guides and API documentation
- Testing: Increase test coverage and add edge cases
- New Model Formats: Add support for additional formats
- Platform Support: Improve Windows/macOS compatibility
- Monitoring: Enhance metrics and observability
- Security: Strengthen authentication and authorization
- UI/UX: Improve CLI and TUI interfaces
- Examples: Add more usage examples
- Integrations: Add client libraries for other languages
- Deployment: Docker, Kubernetes, cloud deployment guides
type(scope): brief description
Longer description explaining the change and why it was made.
Fixes #123
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(backends): add GPU memory optimization for GGUF models
Implements dynamic memory allocation that reduces GPU memory usage
by 30% for large models while maintaining inference speed.
Fixes #456
---
fix(cache): resolve race condition in concurrent cache access
The cache was not properly handling concurrent reads and writes,
leading to occasional panics. Added proper synchronization using
Arc<RwLock<>> pattern.
Fixes #789
- Keep PRs focused and reasonably sized
- Write clear PR descriptions explaining the change
- Respond to feedback promptly and constructively
- Update documentation and tests as needed
- Be constructive and helpful in feedback
- Focus on code correctness, performance, and maintainability
- Check that tests adequately cover the changes
- Verify documentation is updated
- Follow Semantic Versioning
- Major: Breaking changes
- Minor: New features (backward compatible)
- Patch: Bug fixes (backward compatible)
- Update CHANGELOG.md
- Update version in Cargo.toml
- Run full test suite
- Create release PR
- Tag release after merge
- Publish to crates.io
- Update Docker images
We use these labels to organize issues and PRs:
bug: Something isn't workingenhancement: New feature or improvementdocumentation: Documentation needsgood first issue: Good for newcomershelp wanted: Extra attention neededperformance: Performance improvementssecurity: Security-related changes
- GitHub Discussions: Community help and questions
- Issues: Report bugs or request features
Thank you for contributing to Inferno! 🔥