Skip to content

PyR0 v0.8.0: Production-ready API with safety improvements

Latest

Choose a tag to compare

@garyrob garyrob released this 20 Aug 20:01

πŸš€ 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 release parameter from build_guest() - Always uses release mode now
  • Removed dry_run from public API - Was insecure for production use

✨ New Features

  • InputBuilder API - Safe, chainable API for serializing guest input data
  • Framing support - Mix CBOR and raw data safely with write_cbor_frame() and write_frame()
  • Typed helpers - write_bytes32() and write_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