Thank you for your interest in contributing to RAZ! This guide will help you get started.
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and welcoming to all contributors.
- Check if the issue already exists
- Include a clear description
- Provide steps to reproduce
- Include relevant error messages and logs
- Mention your OS, Rust version, and RAZ version
- Check if the feature has been requested
- Clearly describe the use case
- Explain why existing features don't solve the problem
- Provide examples of how it would work
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
cargo test) - Run clippy (
cargo clippy -- -D warnings) - Format your code (
cargo fmt) - Commit with a descriptive message
- Push to your fork
- Open a Pull Request
# Clone your fork
git clone https://github.com/your-username/raz.git
cd raz
# Add upstream remote
git remote add upstream https://github.com/raz-rs/raz.git
# Install development dependencies
rustup component add clippy rustfmt
# Build the project
cargo build
# Run tests
cargo test
# Run with logging
RUST_LOG=debug cargo run --bin raz -- list-
raz-core/- Core librarysrc/context.rs- Project analysissrc/providers/- Command providerssrc/ast.rs- Tree-sitter integrationsrc/filters.rs- Command filtering
-
raz-adapters/- IDE integrationscli/- Command-line interfaceraz-adapters/vscode/- VS Code extension
-
docs/- Documentation
- Create a new file in
raz-core/src/providers/ - Implement the
CommandProvidertrait - Add tests in the same file
- Register in
providers.rs - Update documentation
Example:
use async_trait::async_trait;
use crate::{CommandProvider, Command, ProjectContext, RazResult};
pub struct MyProvider;
#[async_trait]
impl CommandProvider for MyProvider {
fn name(&self) -> &str { "my-provider" }
async fn commands(&self, context: &ProjectContext) -> RazResult<Vec<Command>> {
// Implementation
}
}cargo testcargo test --test '*'cargo tarpaulin --out Html# Test with example projects
cargo run --bin raz -- --directory test-leptos list
cargo run --bin raz -- --directory test-dioxus list- Update code documentation with
///comments - Update README.md for user-facing changes
- Add examples for new features
- Update CLI help text
- Follow standard Rust naming conventions
- Use
rustfmtfor formatting - Keep functions focused and small
- Prefer explicit over implicit
- Document public APIs
- Use
RazResult<T>for fallible operations - Provide helpful error messages
- Handle edge cases gracefully
- Profile before optimizing
- Prefer lazy evaluation
- Cache expensive computations
- Use parallel operations where beneficial
Follow conventional commits:
feat:New featuresfix:Bug fixesdocs:Documentation changestest:Test additions or fixesrefactor:Code refactoringperf:Performance improvementschore:Maintenance tasks
Example:
feat: add Bevy game engine provider
- Implements commands for game development
- Adds asset management support
- Includes platform-specific builds
- Update version in Cargo.toml files
- Update CHANGELOG.md
- Create a PR with version bump
- After merge, tag the release
- GitHub Actions will publish to crates.io
- Join our Discord server
- Ask questions in GitHub Discussions
- Check existing issues and PRs
- Read the documentation
Contributors will be recognized in:
- The README.md file
- Release notes
- Our website (when launched)
Thank you for contributing to RAZ!