Skip to main content

Crate libpetri_debug

Crate libpetri_debug 

Source
Expand description

§libpetri-debug — Debug Protocol for Petri Net Inspection

Provides a framework-agnostic debug protocol for live inspection, replay, breakpoints, and event filtering of Petri net executions.

§Architecture

  • DebugAwareEventStore wraps a primary EventStore and an Arc<DebugEventStore>, forwarding events to both. The executor owns the wrapper; the protocol handler shares the Arc<DebugEventStore>.
  • DebugProtocolHandler dispatches commands from clients, manages subscriptions, and sends responses via the ResponseSink trait.
  • DebugSessionRegistry tracks sessions, generates DOT diagrams, and extracts net structure.

§Feature Flags

  • archive — Enables gzip-compressed session archive read/write.

Re-exports§

pub use debug_aware_event_store::DebugAwareEventStore;
pub use debug_command::BreakpointConfig;
pub use debug_command::BreakpointType;
pub use debug_command::DebugCommand;
pub use debug_command::EventFilter;
pub use debug_command::SubscriptionMode;
pub use debug_event_store::DebugEventStore;
pub use debug_protocol_handler::DebugProtocolHandler;
pub use debug_protocol_handler::ResponseSink;
pub use debug_response::DebugResponse;
pub use debug_response::NetEventInfo;
pub use debug_response::NetStructure;
pub use debug_response::PlaceInfo;
pub use debug_response::SessionSummary;
pub use debug_response::TokenInfo;
pub use debug_response::TransitionInfo;
pub use debug_session_registry::DebugSession;
pub use debug_session_registry::DebugSessionRegistry;
pub use marking_cache::ComputedState;
pub use place_analysis::PlaceAnalysis;

Modules§

archive
Session archive support for persisting and replaying debug sessions.
debug_aware_event_store
Event store wrapper that delegates to both a primary store and a debug store.
debug_command
Commands sent from debug UI client to server via WebSocket.
debug_event_store
Event store with live tailing and historical replay for debug sessions.
debug_protocol_handler
Framework-agnostic handler for the Petri net debug protocol.
debug_response
Responses sent from server to debug UI client via WebSocket.
debug_session_registry
Registry for managing Petri net debug sessions.
marking_cache
Caches computed state snapshots at periodic intervals for efficient seek/step.
net_event_converter
Converts Rust NetEvent instances to serializable NetEventInfo.
place_analysis
Analyze places for start/end/environment classification.