apple-plist 1.0.0

Apple property-list serialization: XML, binary, OpenStep, and GNUStep.
Documentation

apple-plist

crates.io docs.rs CI codecov MSRV License: Apache-2.0

A serde-native Rust library for reading and writing Apple property lists in all four dialects — XML, binary (bplist00), OpenStep, and GNUStep.

Why apple-plist?

Most Rust plist crates handle XML and binary. apple-plist targets all four Apple property-list formats in both directions, and handles the edge cases that show up in real-world files: 128-bit integer truncation, lax OpenStep coercion, CF$UID keyed-archive aliasing, binary object uniquing, and the three date encodings.

Format Read Write
XML
Binary (bplist00)
OpenStep (ASCII)
GNUStep

Decoding auto-detects the format; encoding picks the format you name.

Quick start

use apple_plist::{detect, Format, Value};

fn main() -> Result<(), apple_plist::Error> {
    let bytes = apple_plist::to_vec(&true, Format::Xml)?;

    let value: Value = apple_plist::from_slice(&bytes)?;
    assert_eq!(value, Value::Boolean(true));
    assert_eq!(detect(&bytes), Some(Format::Xml));
    Ok(())
}

Cargo features

All on by default; disable what you don't need. Every combination compiles, and features only add API.

  • serde — derive-driven (de)serialization.
  • xml — the XML codec.
  • binary — the binary (bplist00) codec.
  • openstep — the OpenStep / GNUStep text codec (the two dialects share a parser; OpenStep-versus-GNUStep is a runtime outcome).

Minimum Supported Rust Version

1.88. Raising it is a deliberate, semver-relevant change.

Pre-1.0. The public API may change before 1.0.

License

Licensed under the Apache License, Version 2.0. See NOTICE for third-party attributions.