Crates.io | plist_ffi |
lib.rs | plist_ffi |
version | 0.1.6 |
created_at | 2025-07-24 07:00:09.166629+00 |
updated_at | 2025-09-25 15:56:59.464254+00 |
description | C FFI for the amazing plist crate, compatible with libplist |
homepage | |
repository | https://github.com/jkcoxson/plist_ffi |
max_upload_size | |
id | 1765633 |
size | 5,077,008 |
idevice has an FFI C interface. The FFI library used to convert between libplist and Rust's plist crate by serializing to XML and deserializing on the other side of the FFI boundary.
This adds complication and a large performance overhead. To bridge the gap, I've taken libplist's headers and designed a compatible Rust library under it.
TLDR: libplist has been ported to Rust using the plist crate.
The tests that make sense in this context have been copied over from libplist. They pass with the exception of deserialization disrepencies with spaces.
The C++ source and headers have been copied over, making this library usable from C++. Tests that make sense to run complete with the same caveats as above.
The plist library is designed as nodes. Pointers to a wrapping struct are passed
as libplist's plist_t
. Each wrapper maintains a vector of child nodes that
are created by various libplist methods, and frees them when the parent is freed.
Wrappers are allocated with pointers to the child node they reference, and then are freed with the parent.
The plist crate has serde issues with the UID type. There is an open issue from years ago with no progress being made towards fixing it.
I'm not a lawyer. libplist's code (header, C++, tests) are under their original license. Any code written by me (Rust files) are under MIT OR libplist's license. Please open an issue if this licensing is illegal or incompatible.