π PyR0 v0.8.0
This release removes all experimental scaffolding and provides a clean, production-ready API for RISC Zero proof generation from Python.
β οΈ Breaking Changes
- Removed
VerifierContext- Was a non-functional placeholder - Removed merkle functionality - Moved to separate PySMT project
- Removed
releaseparameter frombuild_guest()- Always uses release mode now - Removed
dry_runfrom public API - Was insecure for production use
β¨ New Features
InputBuilderAPI - Safe, chainable API for serializing guest input data- Framing support - Mix CBOR and raw data safely with
write_cbor_frame()andwrite_frame() - Typed helpers -
write_bytes32()andwrite_image_id()for common 32-byte values
π§ Improvements
- Enforced release-only builds - 100-1000x performance improvement, no debug mode
- Consolidated test organization - All tests now in
test/directory - Fixed all placeholder implementations - No more mock code
- Honest documentation - Clear about what each API actually does
- Production-safe defaults - No dev mode, no mocking, no shortcuts
π API Highlights
Safe Input Serialization
# New InputBuilder API with three safe patterns
builder = pyr0.InputBuilder()
# Pattern A: CBOR-only
builder.write_cbor(cbor_bytes)
# Pattern B: Raw-only
builder.write_u32(42).write_bytes32(key)
# Pattern C: Framed (safe mixing)
builder.write_cbor_frame(cbor_bytes).write_u32(42)
input_data = builder.build()Simplified Build API
# Always builds in release mode for optimal performance
elf_path = pyr0.build_guest("path/to/guest")π Safety & Security
- No debug/dev mode support
- No mock implementations
- Clear API boundaries between serialization patterns
- Cryptographically secure proof generation only
π¦ Installation
# From PyPI (when available)
pip install PyR0==0.8.0
# From source
git clone https://github.com/garyrob/PyR0.git
cd PyR0
uv tool run maturin build --release
uv pip install target/wheels/PyR0-0.8.0-*.whlβ οΈ Important Notes
- Still in alpha - API may change
- Currently supports Apple Silicon (M1/M2/M3) only
- Requires RISC Zero toolchain installed
π Acknowledgments
This release represents a major cleanup and hardening of the PyR0 API. Special thanks to the RISC Zero team for their excellent zkVM platform.
Full Changelog: v0.7.0...v0.8.0