libpetri_debug/lib.rs
1//! # libpetri-debug — Debug Protocol for Petri Net Inspection
2//!
3//! Provides a framework-agnostic debug protocol for live inspection,
4//! replay, breakpoints, and event filtering of Petri net executions.
5//!
6//! ## Architecture
7//!
8//! - [`DebugAwareEventStore`] wraps a primary `EventStore` and an `Arc<DebugEventStore>`,
9//! forwarding events to both. The executor owns the wrapper; the protocol handler
10//! shares the `Arc<DebugEventStore>`.
11//! - [`DebugProtocolHandler`] dispatches commands from clients, manages subscriptions,
12//! and sends responses via the [`ResponseSink`] trait.
13//! - [`DebugSessionRegistry`] tracks sessions, generates DOT diagrams, and extracts
14//! net structure.
15//!
16//! ## Feature Flags
17//!
18//! - `archive` — Enables gzip-compressed session archive read/write.
19
20pub mod archive;
21pub mod debug_aware_event_store;
22pub mod debug_command;
23pub mod debug_event_store;
24pub mod debug_protocol_handler;
25pub mod debug_response;
26pub mod debug_session_registry;
27pub mod marking_cache;
28pub mod net_event_converter;
29pub mod place_analysis;
30
31// Re-exports for convenience
32pub use debug_aware_event_store::DebugAwareEventStore;
33pub use debug_command::{
34 BreakpointConfig, BreakpointType, DebugCommand, EventFilter, SubscriptionMode,
35};
36pub use debug_event_store::DebugEventStore;
37pub use debug_protocol_handler::{DebugProtocolHandler, ResponseSink};
38pub use debug_response::{
39 DebugResponse, NetEventInfo, NetStructure, PlaceInfo, SessionSummary, TokenInfo, TransitionInfo,
40};
41pub use debug_session_registry::{DebugSession, DebugSessionRegistry};
42pub use marking_cache::ComputedState;
43pub use place_analysis::PlaceAnalysis;