| Crates.io | brewdiff |
| lib.rs | brewdiff |
| version | 0.2.0 |
| created_at | 2025-08-20 23:55:35.026235+00 |
| updated_at | 2025-08-23 00:07:16.640828+00 |
| description | Homebrew diff functionality for nix-darwin configurations |
| homepage | https://github.com/kiliankoe/brewdiff |
| repository | https://github.com/kiliankoe/brewdiff |
| max_upload_size | |
| id | 1804101 |
| size | 69,601 |
A Rust crate that provides diff functionality for Homebrew packages managed through nix-darwin. It compares what Homebrew actually has installed on the system versus what a nix-darwin configuration declares should be installed.
This crate is designed to show users what Homebrew changes will occur when they activate a new nix-darwin configuration, similar to how the dix crate shows Nix store diffs.
<<< /run/current-system
>>> /nix/var/nix/profiles/system-123-link
ADDED
Formulae
[A] curl
Casks
[A] firefox
[A] visual-studio-code
REMOVED
Formulae
[R] wget
Casks
[R] slack
brew leaves for formulae (only user-installed packages, not dependencies)brew list --cask for casksbrew tap for tapsmas list for Mac App Store appsuse brewdiff;
use std::path::Path;
// Primary use case: compare current state with new nix-darwin profile
let new_profile = Path::new("/nix/var/nix/profiles/system-123-link");
// Async diff computation
let handle = brewdiff::spawn_homebrew_diff(new_profile.to_path_buf());
if let Ok(diff_data) = handle.join() {
let diff = diff_data?;
println!("Changes: {} additions, {} removals",
diff.brews.added.len(),
diff.brews.removed.len());
}
// Or synchronous diff with output
let lines_written = brewdiff::write_homebrew_diffln(
&mut std::io::stdout(),
new_profile,
)?;