Thank you for your interest in contributing to Scrybe! This document provides guidelines and instructions for contributing.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
- Rust 1.70+ (install via rustup)
- Git
- cargo-audit (optional, auto-installs in hooks)
-
Fork and clone the repository:
git clone https://github.com/yourusername/scrybe.git cd scrybe -
Install git hooks (recommended):
./.githooks/install.sh
This installs pre-commit hooks that run:
- Code formatting check
- Clippy lints
- All tests
- Security audit
- Build verification
-
Build the project:
cargo build --workspace
-
Run tests:
cargo test --workspace
Scrybe follows TigerStyle coding standards:
-
No
unwrap()orpanic!()in production code- Use
ResultandOptionwith proper error handling - Use
.expect()only in tests with detailed error messages
- Use
-
Explicit error handling
- Use
map_errfor error conversion (noFromimplementations) - Provide detailed error context
- Use
-
Type safety
- Leverage the type system to prevent invalid states
- Use newtype patterns for domain-specific types
-
Documentation
- All public APIs must have rustdoc comments
- Include examples in documentation
- Document errors and panics
-
Testing
- Minimum 90% test coverage required
- Write unit tests in same file with
#[cfg(test)] - Integration tests in
tests/directory
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow TigerStyle guidelines
- Write tests for new functionality
- Update documentation
-
Run quality checks
If you installed git hooks, these run automatically on commit. Otherwise, run manually:
# Format code cargo fmt --all # Check for warnings cargo clippy --workspace -- -D warnings # Run tests cargo test --workspace # Security audit cargo audit # Check documentation cargo doc --workspace --no-deps
Tip: Use fast mode for development:
cp .githooks/pre-commit-fast .git/hooks/pre-commit
-
Commit with conventional commits
git commit -m "feat(core): add fingerprint validation" git commit -m "fix(gateway): handle shutdown gracefully" git commit -m "docs(readme): update installation instructions"
Prefixes:
feat: New featurefix: Bug fixdocs: Documentation changestest: Test additions/changesrefactor: Code refactoringperf: Performance improvementschore: Build/tooling changes
-
Push and create PR
git push origin feature/your-feature-name
Then create a pull request on GitHub.
Before submitting a PR, ensure:
- Code follows TigerStyle guidelines
- Git hooks installed and passing:
./.githooks/install.sh - All tests pass:
cargo test --workspace - No clippy warnings:
cargo clippy --workspace -- -D warnings - Code is formatted:
cargo fmt --all - Security audit clean:
cargo audit - Documentation is updated
- Test coverage is maintained (>90%)
- Commit messages follow conventional commits
- PR description clearly explains changes
Note: If you have git hooks installed, most of these checks run automatically on commit.
When creating issues:
- Search existing issues to avoid duplicates
- Use appropriate labels (bug, enhancement, documentation, etc.)
- Provide context:
- For bugs: steps to reproduce, expected vs actual behavior
- For features: use case, proposed solution
- Link to relevant RFCs if applicable
For major features or architectural changes:
- Create an RFC in
docs/rfcs/ - Follow the RFC template
- Open a PR for the RFC
- Gather feedback from reviewers
- Once approved, implement in separate PR(s)
- Technical questions: Open a GitHub discussion
- Bug reports: Open a GitHub issue
- Security issues: Email security@scrybe.io (create this email)
Thank you for contributing to Scrybe! 🦉