mf4_rs/
lib.rs

1//! Minimal utilities for reading and writing ASAM MDF 4 files.
2//!
3//! The crate exposes a high level API under [`api`] to inspect existing
4//! recordings as well as a [`writer::MdfWriter`] to generate new files.  Only a
5//! fraction of the MDF 4 specification is implemented.
6
7pub mod blocks;
8pub mod error;
9pub mod writer;
10pub mod cut;
11pub mod merge;
12pub mod index;
13
14pub mod parsing {
15    pub mod decoder;
16    pub mod mdf_file;
17    pub mod raw_channel_group;
18    pub mod raw_data_group;
19    pub mod raw_channel;
20    pub mod source_info;
21}
22
23pub mod api {
24    pub mod mdf;
25    pub mod channel_group;
26    pub mod channel;
27}
28
29// Python bindings module
30#[cfg(feature = "pyo3")]
31pub mod python;
32
33// Re-export the Python module when building as an extension
34#[cfg(feature = "pyo3")]
35use pyo3::prelude::*;
36
37#[cfg(feature = "pyo3")]
38#[pymodule]
39fn mf4_rs(m: &Bound<'_, PyModule>) -> PyResult<()> {
40    python::init_mf4_rs_module(m)
41}