| Crates.io | mcdp-format2-rs |
| lib.rs | mcdp-format2-rs |
| version | 2.17.2 |
| created_at | 2025-07-14 16:12:27.544314+00 |
| updated_at | 2025-07-14 16:16:26.621547+00 |
| description | A Rust library for loading and saving datasets in the MCDP V2 format. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1751998 |
| size | 282,007 |
A Rust library for loading and saving datasets in the MCDP V2 format.
mcdp-format2-rs is a Rust implementation for parsing and handling MCDP format version 2 files.
It supports multiple serialization formats including JSON, YAML, and CBOR, with optional gzip compression.
Add this to your Cargo.toml:
[dependencies]
mcdp-format2-rs = "2"
use mcdp_format2_rs::{read_mcdp_root, Root};
use std::path::Path;
// Load an MCDP file
let path = Path::new("example.mcdp2.json");
let root: Root = read_mcdp_root(path)?;
The package includes a CLI tool mcdp-format2-rs-load for parsing and validating MCDP files:
# Parse all MCDP files in a directory
mcdp-format2-rs-load /path/to/mcdp/files
# Use a custom pattern
mcdp-format2-rs-load -p "*.mcdp2.json" /path/to/files
# Verbose output
mcdp-format2-rs-load -v /path/to/files
The library automatically detects file format based on extension:
.json - JSON format.yaml, .yml - YAML format.cbor - CBOR format.json.gz - Gzipped JSON.yaml.gz, .yml.gz - Gzipped YAML.cbor.gz - Gzipped CBOR