openstep-plist

Crates.ioopenstep-plist
lib.rsopenstep-plist
version1.0.0
created_at2025-11-28 10:09:02.151434+00
updated_at2025-12-17 11:39:29.566707+00
descriptionParser and serializer for OpenStep Property List format
homepagehttps://github.com/simoncozens/glyphslib-rs
repositoryhttps://github.com/simoncozens/glyphslib-rs
max_upload_size
id1955083
size17,689,360
Simon Cozens (simoncozens)

documentation

https://docs.rs/openstep-plist

README

openstep-plist

A Rust parser and serializer for the OpenStep Property List format.

Overview

OpenStep Property Lists are a text-based data serialization format used by NeXTSTEP, macOS, and various applications including Glyphs font editor. This crate provides:

  • Parsing: Convert OpenStep plist text to Rust data structures
  • Serialization: Convert Rust data structures back to OpenStep plist format
  • Serde integration: Full support for serde serialization/deserialization

Format

The OpenStep Property List format is similar to JSON but uses a different syntax:

{
    name = "Example";
    values = (1, 2, 3);
    nested = {
        key = value;
    };
}

Installation

Add this to your Cargo.toml:

[dependencies]
openstep-plist = "0.1"

Usage

Parsing

use openstep_plist::Plist;

let plist_text = r#"{
    name = "Hello";
    count = 42;
}"#;

let plist = Plist::parse(plist_text)?;

With Serde

use serde::{Deserialize, Serialize};
use openstep_plist;

#[derive(Serialize, Deserialize)]
struct Config {
    name: String,
    count: i32,
}

let plist_text = r#"{ name = "Hello"; count = 42; }"#;
let config: Config = openstep_plist::from_str(plist_text)?;

let serialized = openstep_plist::to_string(&config)?;

Features

  • Full support for OpenStep plist data types: dictionaries, arrays, strings, numbers, booleans, and data
  • Preserves numeric precision
  • Handles quoted and unquoted strings
  • Comment support
  • Efficient parsing with minimal allocations

Origins

This crate is inspired by and partially based on the ascii_plist_derive crate but provides Serde integration and support for serialization as well as deserialization.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 81

cargo fmt