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.
Installation Issues
rzup installation fails
rzup installation fails
Symptoms:
rzupcommand not found- Installation script errors
-
Ensure prerequisites are installed:
-
Reinstall rzup:
-
Check PATH configuration:
Ensure
~/.cargo/binis in your PATH:
After installation, restart your terminal or run
source ~/.bashrc (or ~/.zshrc).RISC Zero toolchain version mismatch
RISC Zero toolchain version mismatch
Symptoms:
- “Version mismatch” errors
- Compilation failures after updating
risc0-zkvm version:Build Errors
Guest build fails with missing dependencies
Guest build fails with missing dependencies
Symptoms:
- Linker errors
- Missing symbol errors (e.g.,
_end)
-
Install the RISC Zero toolchain:
-
Verify toolchain installation:
-
Clean and rebuild:
RISC0_SKIP_BUILD errors
RISC0_SKIP_BUILD errors
Symptoms:This skips time-consuming guest builds during development.
- Clippy or IDE errors about missing guest methods
clippy or IDE analysis, set RISC0_SKIP_BUILD=1 to skip guest compilation:Reproducible build fails in Docker
Reproducible build fails in Docker
Symptoms:This runs the build inside a Docker container to ensure reproducibility.
- Docker build errors
- Feature flag issues in Docker
cargo risczero build command for deterministic builds:Ensure Docker is installed and running before using
cargo risczero build.Runtime Errors
Guest program panics or exits unexpectedly
Guest program panics or exits unexpectedly
Debugging steps:
-
Enable debug logging:
-
Add debug output in guest:
- Use GDB for debugging: See the Debugging with GDB guide for detailed instructions.
-
Check for common issues:
- Stack overflows (increase stack size if needed)
- Out of memory (use the embedded allocator for long-running programs)
- Unsupported syscalls
Environment variables not working in guest
Environment variables not working in guest
Symptoms:
std::env::var()fails or panics- Environment variable access errors
sys_getenv, sys_argc, sys_argv) are disabled by default for security reasons. Code designed for the host may behave insecurely in the guest.Solution:Enable environment variables via the RISC0_GUEST_LOGENV feature flag on risc0-zkvm-platform if absolutely necessary:Proof generation fails or hangs
Proof generation fails or hangs
Possible causes and solutions:
-
Insufficient memory:
- Close other applications
- Use GPU proving for better memory efficiency
- Split computation using continuations
-
GPU driver issues:
-
Version compatibility:
- Ensure all RISC Zero crates use the same version
- Update dependencies:
cargo update
-
Use execute-only mode for testing:
Execute without proving to verify guest logic:
Receipt verification fails
Receipt verification fails
Common issues:
-
Image ID mismatch:
- Ensure the verifier uses the correct Image ID
- Rebuild the guest if the code changed
-
Control ID version mismatch:
- Prover and verifier must use the same zkVM version
- Check that all dependencies match
-
Corrupted receipt:
- Verify serialization/deserialization is correct
- Check network transmission didn’t corrupt data
Performance Issues
Proof generation is too slow
Proof generation is too slow
Optimization strategies:
-
Enable GPU proving:
-
Profile your guest code:
- Use precompiles for cryptographic operations
-
Optimize guest code:
- See the Optimization Guide
- Reduce unnecessary computation
- Use efficient algorithms
- Consider proof composition: Split large computations into smaller proofs that can be composed
High cycle count
High cycle count
Investigation steps:
-
Profile with RISC0_INFO:
-
Check for inefficient operations:
- Memory allocations
- String operations
- Large data structures
-
Use precompiles where applicable:
- SHA-256: Use the accelerated SHA extension
- BigInt: Use
risc0-bigint2for modular arithmetic - Keccak: Use the keccak precompile
- ECDSA: Use accelerated signature verification
Rust-Specific Issues
std not available in guest
std not available in guest
Symptoms:For allocations, enable the
- “std not found” errors in guest code
no_std environment by default. Import the guest standard library:alloc crate:Crate not compatible with RISC-V
Crate not compatible with RISC-V
Symptoms:
- Build errors with third-party crates
- “not found” errors for std types
no_std and RISC-V:- Look for
no_stdsupport in the crate documentation - Check the supported crates list
- Consider alternatives or implement the functionality yourself
Some crates require C bindings. See Rust Crates with C++ Bindings for guidance.
thread_local! crashes the guest
thread_local! crashes the guest
Solution:Use Rust toolchain version
r0.1.79.0-1 or later. Earlier versions have a bug with thread_local! in combination with the heap allocator.Update your toolchain:Testing and CI
Tests are too slow
Tests are too slow
Solutions:
-
Use dev mode for rapid testing without proving:
-
Skip guest builds during unit tests:
- Use light builds for development: Light builds are faster but not production-ready.
CI/CD pipeline issues
CI/CD pipeline issues
Common solutions:
-
Install Git LFS in CI:
-
Cache dependencies:
Cache
~/.cargoandtarget/directories - Use consistent toolchain versions: Pin versions in your CI configuration
- Docker support: Ensure Docker is available for reproducible builds
Getting Help
If you can’t find a solution here:GitHub Issues
Search existing issues or open a new one
Discord
Ask questions in the community
Known Workarounds
Check tagged workarounds on GitHub
FAQ
Common questions and answers
When reporting issues, include:
- RISC Zero version (
cargo tree | grep risc0) - Rust version (
rustc --version) - Operating system and architecture
- Minimal reproduction case
- Error messages and logs