Skip to content

PyR0 v0.2.0 - Clean Architecture

Choose a tag to compare

@garyrob garyrob released this 16 Aug 02:39
· 8 commits to main since this release

🧹 PyR0 v0.2.0 - Clean Architecture Release

This release focuses on removing unnecessary complexity and legacy code, plus comprehensive documentation improvements.

πŸ—‘οΈ Major Cleanup

Removed Unused Features

  • Eliminated all pickle support - Removed unnecessary PyO3 pickle implementation that wasn't being used
  • Deleted serialization.rs - This file only provided unused pickle support
  • Removed unused imports - Cleaned up test files

Removed Legacy Methods

  • journal_bytes() β†’ Use journal property
  • image_id β†’ Use id property
  • ed25519_input_vecs() β†’ Use ed25519_input()

✨ Improvements

Better Documentation

  • Comprehensive serialization guide explaining env::read() vs env::read_slice()
  • Architecture overview showing how PyR0 bridges Python and RISC Zero
  • Common pitfalls section with solutions for serialization mismatches
  • Clear examples of matching host and guest serialization methods

Better Serialization Helpers

  • Demos now properly use serialization helpers for testing
  • merkle_zkp_demo.py uses merkle_commitment_input()
  • ed25519_demo.py uses ed25519_input()
  • Clear documentation on when to use each helper

Cleaner Codebase

  • Smaller binary size without pickle support
  • Clearer separation between Rust and Python code
  • No confusing duplicate methods
  • Better alignment between host serialization and guest deserialization

πŸ“– Key Documentation Additions

The README now includes:

  • When to use env::read() vs env::read_slice() in guests
  • How to mix serialization methods in a single input
  • Common pitfalls and their solutions
  • Build notes about --force-reinstall requirement

πŸ’” Breaking Changes from v0.1.0

  • Pickle support removed - If you were pickling PyR0 objects, use standard serialization methods instead
  • Legacy method aliases removed - Update to use the new property-based API

πŸ“¦ Installation

git clone https://github.com/garyrob/PyR0.git
cd PyR0
uv tool run maturin build --release
uv pip install --force-reinstall target/wheels/PyR0-0.2.0-*.whl

πŸ§ͺ Testing

Both demos continue to work perfectly:

uv run demo/ed25519_demo.py      # Ed25519 signature verification
uv run demo/merkle_zkp_demo.py   # Privacy-preserving membership proofs

πŸ“ Notes

  • Still in alpha - API may continue to evolve
  • Currently Apple Silicon only (M1/M2/M3)
  • Requires Python 3.8.3+ and Rust toolchain

This release makes PyR0 leaner, more focused, and better documented for developers working with RISC Zero zkVM.