docs.rs failed to build defaults-rs-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
defaults-rs
Near drop-in replacement for the macOS defaults
CLI with API bindings for Rust
Key Features
- CLI (
drs
): Drop-in replacement for thedefaults
command on macOS. - Async Rust API: Read, write, delete, rename, import/export, and inspect preferences from Rust code.
- Supports: User and global domains, all plist value types (int, float, bool, string, arrays, dictionaries).
- Apple-style Output: Pretty-prints plist data in the familiar macOS format.
- Binary & XML Plist: Handles both binary and XML plist files transparently.
- Extensible: Designed for easy addition of new commands and value types.
Installation
Using brew
:
Using cargo
:
Manual Build & Install
CLI Usage
The CLI command is drs
. It closely mimics the original defaults
tool.
Examples
Read a key
Write a key
Delete a key
Read the whole domain
Use the global domain
Read the type of a key
Rename a key
Import/Export a domain
Rust API
To access the developer-side API for defaults-rs
, run the following command and add it to your Cargo project:
Example
use ;
async
License
This project has been licensed under the MIT License.