#plist #apple

plist-macro

Macros and utilities for manipulating plists

7 releases

Uses new Rust 2024

new 0.1.6 Feb 18, 2026
0.1.5 Feb 18, 2026
0.1.3 Jan 22, 2026

#719 in Rust patterns

Download history 58/week @ 2025-12-30 38/week @ 2026-01-06 34/week @ 2026-01-13 29/week @ 2026-01-20 48/week @ 2026-01-27 11/week @ 2026-02-03 90/week @ 2026-02-10

182 downloads per month
Used in 3 crates

MIT license

31KB
670 lines

plist_macro

Macros and utilities to make plist manipulation easy

General overview/usage

use plist_macro::{plist, pretty_print_plist};

let hmmm = Some(true);

let flatten_me = plist!({
    "a": 1,
    "b": 2,
})

let value = plist!({
    "code": 200,
    "success": true,
    "payload": {
        "features": [
            "serde",
            "plist"
        ],
        "homepage": null
    },
    "optional":? hmmm,
    :< flatten_me
});

println!("{:?}", pretty_print_plist(&value));

Force into a dictionary

use plist_macro::{plist, pretty_print_dictionary};

let value = plist!(dict { // <- this makes a dictionary, not a generic value
    "wow": true,
});

println!("{:?}", pretty_print_dictionary(&value));

Generic plist values

use plist_macro::{plist};

let value = plist!(1);
let value2 = plist!(true);
let value3 = plist!("hi mom");

Go crazy

License

MIT

Dependencies

~4MB
~75K SLoC