Rust4PM / r4pm

Rust4PM is the process_mining Rust crate for process mining, providing OCEL 2.0 and XES data structures with efficient import and export, and object-centric process discovery. It is dual-licensed under Apache-2.0 and MIT and documented on docs.rs.
r4pm provides Python bindings for Rust4PM, auto-generated from the process_mining crate so all exposed functions come with full IDE support (autocomplete, type hints, docs). It combines a registry system for managing data objects across calls with a Polars DataFrame-oriented API for fast data transfer between Python and Rust. An optional r4pm-full variant additionally bundles DuckDB support.
Both support all OCEL 2.0 formats, including XML, JSON, SQLite, CSV, and the bundled ZIP format. OCEL 2.0 logs can also be built programmatically, event and object by event and object, and exported back to any of these formats.
For object-centric analysis specifically, Rust4PM provides OC-DFG discovery, OC-DECLARE constraint discovery and conformance checking, and utilities such as object attribute change histories and per-type event/object statistics.
Installation instructions, examples, and release information for r4pm are available on the r4pm PyPI page; Rust4PM’s source code and documentation are available in the Rust4PM GitHub repository.