proof-stream — real-time 3D streaming visualization of stwo-ml ZK proof sessions.
Overview
This crate intercepts events emitted during stwo-ml proving (GKR walk, sumcheck rounds, GPU utilization, layer activations) and streams them to a Rerun viewer in real time via a background thread.
Quick start
# With the `rerun` feature enabled:
Feature flags
rerun— enables theRerunSinkand its background thread. Without this flag the crate compiles with zero Rerun dependency.
Architecture
- stwo-ml installs a
ProofSinkviaset_proof_sink()(thread-local, RAII). - The prover calls
emit_proof_event!(|| ...)at hot points; the closure is never evaluated when no sink is active. - Active sinks (e.g.
RerunSink) forward events through a bounded crossbeam channel (8 192 slots,try_send— never blocks). - A background thread drains the channel and calls the Rerun SDK.