Documentation Index
Fetch the complete documentation index at: https://mintlify.com/risc0/risc0/llms.txt
Use this file to discover all available pages before exploring further.
Welcome Contributors
Thank you for your interest in contributing to RISC Zero! We welcome contributions from everyone, whether you’re fixing a typo, adding documentation, or implementing new features.If you have questions about contributing or the project in general, please ask in our Discord channel.
Quick Start
To set up your development environment and run the test suite, you’ll need several dependencies.Prerequisites
Git Large File Storage
Install Git LFS and initialize it:Rust
Install Rust using rustup:RISC Zero Toolchain
Install the RISC Zero toolchain with rzup:For Stable Versions
If using a stable version branch, install via the standard flow:Optional: WASM Tools
If testing thebrowser-verify example:
Development Workflow
Fork and Branch
- Fork the repository on GitHub
- Clone your fork:
- Create a feature branch:
Always create a new branch for your work. Do not commit directly to
main.Making Changes
- Write your code following the project’s style and conventions
- Add tests for new functionality
- Update documentation as needed
- Run the PR checklist (see below) before submitting
PR Checklist
Before submitting a pull request, ensure the following:1. Format Code
Runcargo fmt on all code:
2. Run Linter
Runclippy to catch common mistakes:
3. License Check
Run the license check script:4. Run Tests
Run the full test suite:5. Update Cargo.lock
If dependencies changed, commit the updatedCargo.lock:
6. Open Pull Request
Open a PR against themain branch with:
- Clear description of changes
- Reference to related issues (if applicable)
- Screenshots or examples (if relevant)
Contribution Areas
Code Contributions
Bug Fixes
Fix reported issues and improve stability
Features
Implement new functionality
Performance
Optimize execution or proving performance
Examples
Add new example applications
Documentation Contributions
- Fix typos and improve clarity
- Add missing documentation
- Create tutorials and guides
- Update outdated information
Documentation contributions are just as valuable as code contributions!
Testing Contributions
- Add test coverage for untested code
- Create regression tests for fixed bugs
- Improve test infrastructure
- Add benchmarks
Coding Standards
Rust Style
- Follow standard Rust conventions
- Use
cargo fmtfor formatting - Address
clippywarnings - Write idiomatic Rust code
Commit Messages
Write clear, descriptive commit messages:Documentation
-
Add doc comments for public APIs:
- Update README.md files when adding features
- Keep documentation in sync with code changes
Testing Guidelines
Unit Tests
Add unit tests for new functionality:Integration Tests
Add integration tests in thetests/ directory for complex functionality.
Running Specific Tests
Performance Considerations
Profiling
When optimizing performance:- Measure first: Use
RISC0_INFO=1to profile - Benchmark: Add benchmarks for critical paths
- Document: Explain performance improvements in PR
Benchmarking
Add benchmarks tobenches/:
Debugging
Common Issues
Build fails after pulling changes
Build fails after pulling changes
Try a clean rebuild:
Test hangs or fails
Test hangs or fails
Run with debug output:
Clippy errors
Clippy errors
Some clippy warnings can be allowed in specific contexts:However, prefer fixing the warning when possible.
Getting Help
Community Resources
Discord
Ask questions and discuss with the community
GitHub Discussions
Long-form discussions and Q&A
GitHub Issues
Report bugs and request features
Documentation
Read the comprehensive documentation
Getting Reviews
- Be responsive to review feedback
- Ask questions if feedback is unclear
- Keep PRs focused and reasonably sized
- Be patient - maintainers review in their spare time
Code of Conduct
We expect all contributors to:- Be respectful and inclusive
- Welcome newcomers
- Accept constructive criticism gracefully
- Focus on what’s best for the community
- Show empathy towards others
By participating in this project, you agree to abide by our community standards.
Recognition
Contributors are recognized in:- Release notes for significant contributions
- GitHub contributors page
- Community shoutouts on Discord
License
By contributing to RISC Zero, you agree that your contributions will be licensed under the project’s license.Next Steps
Thank you for contributing to RISC Zero!