cargo_resolvediff/lib.rs
1// Copyright (C) 2026 by GiGa infosystems
2
3//! `cargo-resolvediff` is an application that allows to build a diff between the resolved
4//! dependency graph between different versions, including automatic updates.
5//!
6//! The order of operations is:
7//! * Gather & index metadata with [`indexed::IndexedMetadata`]
8//! * Optionally do major updates with [`major_updates::ManifestDependencySet`]
9//! * Resolve the crate graph into a format that stores reasons for inclusion & kinds of
10//! dependencies with [`resolve::Resolved`]
11//! * Get a diff between different [`resolve::Resolved`]s with [`diff::Diff`]
12//!
13//! Currently, only [crates.io] & path dependencies are correctly handled, git dependencies get
14//! interpreted as [crates.io] dependencies for diffing purposes.
15//!
16//! This is fine as long as `git` dependencies aren't automatically updated, or `git` changes
17//! point to a branch or are manually updated by someone else.
18
19use serde::Serialize;
20
21/// A platform tuple (such as `x86_64-unknown-linux-gnu`)
22#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Serialize)]
23#[serde(transparent)]
24pub struct Platform(pub String);
25
26mod cmd;
27
28pub mod diff;
29pub mod git;
30pub mod indexed;
31pub mod major_updates;
32pub mod resolve;
33pub mod toml_edit;
34pub mod util;