mcdp-format2-rs
A Rust library for loading and saving datasets in the MCDP V2 format.
Overview
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.
Features
- Multiple Format Support: JSON, YAML, CBOR with optional gzip compression
- Pattern-based File Discovery: Find MCDP files using glob patterns
- Command-line Interface: Built-in CLI tool for parsing and validation
- Comprehensive Type System: Strongly-typed data structures for MCDP components
- Error Handling: Robust error handling with detailed context
Installation
Add this to your Cargo.toml:
[]
= "2"
Usage
Library Usage
use ;
use Path;
// Load an MCDP file
let path = new;
let root: Root = read_mcdp_root?;
Command-line Usage
The package includes a CLI tool mcdp-format2-rs-load for parsing and validating MCDP files:
# Parse all MCDP files in a directory
# Use a custom pattern
# Verbose output
Supported File Formats
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