guppy
Track and query Cargo dependency graphs.
0.17.26
15M downloads/mo
#2481 most downloaded on crates.io
guppy-rs/guppy
What this package is like to depend on
Last release 3 months ago
21 May 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 70 of 71 stable releases
3 versions withdrawn
withdrawn after publishing
7 years old
75 releases · first in 2019
6 releases in the last 12 months
see the full history below
Release timeline
75 releases · Nov 2019 to May 2026Releases
latest 60 of 75-
0.17.2621 May 2026Release notes
Open source →Fixed
A node with a self-loop edge -- typically a package with a
path
dev-dependency on its own crate, or a feature node likebase/[base]
arising from one -- was treated inconsistently by several APIs. The root
cause was that self-edges were counted as incoming edges in the SCC and
topological-sort machinery, which transitively confused everything built
on top:Sccs::externals/ forward roots. Previously, a package whose only
incoming edge was its own self-loop was excluded from the set of forward
roots, so callers iterating over
query_workspace().resolve().root_ids(_)did not see it, and forward
link enumeration on it was broken. Now, self-loop edges no longer
disqualify a node from being a forward root: a single-node SCC is
external iff it has no incoming edges from outside its own SCC.
(#586)- Topological sort. Previously,
TopoWithCycles::newfiltered
self-looping nodes out of its root set for the same reason, dropping
them from the DFS and then placing them and their descendants at the
end of the topological order via a best-effort fallback. Now, the
root-set predicate accepts a node whose only incoming edge is its own
self-loop, so such nodes are visited in DFS order alongside other
roots. (#589) Cycles::is_cyclicandfeature::Cycles::is_cyclic. Previously,
these were reflexivelytruefor every package or feature, regardless
of actual cycle membership. Now, they returntrueonly when the
argument lies on a directed cycle: either in a multi-node SCC, or in a
single-node SCC with a self-loop edge. This is a behavior change, but
in the context of the rest of this release is being treated as a
bugfix. (#590)Cycles::all_cyclesandfeature::Cycles::all_cycles. Previously,
these reported only SCCs of two or more elements. Now, they also yield
single-node SCCs whose node has a self-loop edge, in topological order
alongside multi-node SCCs. This makesall_cycles()and
is_cyclic(x, x)agree on what counts as a cycle. (#590)FeatureGraphWarning::SelfLoop. Previously, this warning was
emitted for every self-loop edge in the feature graph, including
legitimate ones such as a path dev-dependency on the package's own
crate. Now, it is restricted to named-feature self-loops like
[features] a = ["a"], which really are user errors. (#592)
Documentation
PackageGraph::directly_depends_onand
FeatureGraph::directly_depends_on. Previously, both documented
themselves as returningfalsewhen the two IDs were equal. The
implementation has always calleddep_graph.contains_edge(a, b),
which correctly returnstruefor self-loop edges, so the
documentation contradicted the behavior. The documentation has now
been corrected to match.FeatureGraph::directly_depends_on. Previously, the docstring
read "returns true iffeature_ais a direct dependency of
feature_b," with the operands inverted relative to the actual
implementation. Now the docstring reflects the implementation:
returns true iffeature_bis a direct dependency offeature_a.
(#591)- [
Cycles] type-level documentation. Previously, the long-form
documentation talked exclusively about multi-node cycles (like
serdeandserde_derive). It now also acknowledges single-node
self-loop cycles as a case.
Release notes
Open source →Fixed
A node with a self-loop edge -- typically a package with a
pathdev-dependency on its own crate, or a feature node likebase/[base]arising from one -- was treated inconsistently by several APIs. The root cause was that self-edges were counted as incoming edges in the SCC and topological-sort machinery, which transitively confused everything built on top:Sccs::externals/ forward roots. Previously, a package whose only incoming edge was its own self-loop was excluded from the set of forward roots, so callers iterating overquery_workspace().resolve().root_ids(_)did not see it, and forward link enumeration on it was broken. Now, self-loop edges no longer disqualify a node from being a forward root: a single-node SCC is external iff it has no incoming edges from outside its own SCC. (#586)- Topological sort. Previously,
TopoWithCycles::newfiltered self-looping nodes out of its root set for the same reason, dropping them from the DFS and then placing them and their descendants at the end of the topological order via a best-effort fallback. Now, the root-set predicate accepts a node whose only incoming edge is its own self-loop, so such nodes are visited in DFS order alongside other roots. (#589) Cycles::is_cyclicandfeature::Cycles::is_cyclic. Previously, these were reflexivelytruefor every package or feature, regardless of actual cycle membership. Now, they returntrueonly when the argument lies on a directed cycle: either in a multi-node SCC, or in a single-node SCC with a self-loop edge. This is a behavior change, but in the context of the rest of this release is being treated as a bugfix. (#590)Cycles::all_cyclesandfeature::Cycles::all_cycles. Previously, these reported only SCCs of two or more elements. Now, they also yield single-node SCCs whose node has a self-loop edge, in topological order alongside multi-node SCCs. This makesall_cycles()andis_cyclic(x, x)agree on what counts as a cycle. (#590)FeatureGraphWarning::SelfLoop. Previously, this warning was emitted for every self-loop edge in the feature graph, including legitimate ones such as a path dev-dependency on the package's own crate. Now, it is restricted to named-feature self-loops like[features] a = ["a"], which really are user errors. (#592)
Documentation
PackageGraph::directly_depends_onandFeatureGraph::directly_depends_on. Previously, both documented themselves as returningfalsewhen the two IDs were equal. The implementation has always calleddep_graph.contains_edge(a, b), which correctly returnstruefor self-loop edges, so the documentation contradicted the behavior. The documentation has now been corrected to match.FeatureGraph::directly_depends_on. Previously, the docstring read "returns true iffeature_ais a direct dependency offeature_b," with the operands inverted relative to the actual implementation. Now the docstring reflects the implementation: returns true iffeature_bis a direct dependency offeature_a. (#591)- [
Cycles] type-level documentation. Previously, the long-form documentation talked exclusively about multi-node cycles (likeserdeandserde_derive). It now also acknowledges single-node self-loop cycles as a case.
-
0.17.2531 Jan 2026Release notes
Open source →Added
Cargo metadata generated on Windows is now parseable on Unix. Windows paths are always normalized to forward slashes on Unix, which allows operations like
.parent()to work. (Cross-platform parsing is not fully tested yet so you might run into issues. Please file a bug if you do.)Release notes
Open source →Added
Cargo metadata generated on Windows is now parseable on Unix. Windows paths are always normalized to forward slashes on Unix, which allows operations like
.parent()to work. (Cross-platform parsing is not fully tested yet so you might run into issues. Please file a bug if you do.) -
0.17.2427 Dec 2025Release notes
Open source →Added
Workspace::build_directory()returns the build directory for intermediate build artifacts (requires Cargo 1.91+).Workspace::default_members()andWorkspace::default_member_ids()iterate over workspace default members (requires Cargo 1.71+; returns empty iterator for older Cargo versions).PackageLink::registry()returns the registry URL for a dependency, if it uses a non-default registry.PackageLink::path()returns the file system path for path dependencies.
-
0.17.2312 Oct 2025 -
0.17.2229 Sep 2025Release notes
Open source →Fixed
Replaced obsolete
doc_auto_cfgwithdoc_cfg, to fix Rust nightly builds with thedoc_cfgflag enabled. -
0.17.2115 Sep 2025 -
0.17.2011 Jul 2025Release notes
Open source →Changed
- Internal dependency update:
cargo_metadataupdated to 0.21.0.- As part of this update, restored compatibility with the unstable bindeps feature -- see this commit.
- MSRV updated to Rust 1.86, as required by dependencies.
- Internal dependency update:
-
0.17.1930 May 2025Release notes
Open source →Changed
- Internal dependency update:
cargo_metadataupdated to 0.20.0. - Some older versions of Cargo, when the unstable bindeps feature is enabled, generate JSON output that is no longer supported by
cargo_metadata. If you run into an error, please update your nightly toolchain. Nightly versions from at least 2024-07 do not appear to produce invalid metadata. - MSRV updated to Rust 1.82.
- Internal dependency update:
-
0.17.1829 Apr 2025Release notes
Open source →Added
CargoSet::with_package_resolversupports passing in aPackageResolverfor additional dynamic filtering of dependency edges.CargoSet::target_linksandhost_linksreturn the set ofPackageLinkinstances followed on the target and host platforms, respectively.
Thanks to anforowicz for these contributions!
-
0.17.1722 Feb 2025Release notes
Open source →Added
- Add
PlatformEval::target_specsto obtain the list ofTargetSpecinstances backing a platform evaluator. Thanks to anforowicz for the contribution!
- Add
-
0.17.1615 Feb 2025Release notes
Open source →Added
BuildTarget::test_by_defaultreturns true if tests are run for a build target by default.BuildTarget::doc_by_defaultreturns true if documentation is enabled for a build target, respectively.
Changed
BuildTarget::doc_testsis nowBuildTarget::doctest_by_default. The old name has been deprecated, but is kept around for compatibility.
-
0.17.1515 Feb 2025 withdrawn -
0.17.1411 Feb 2025Release notes
Open source →Added
-
MetadataCommand::envadds environment variables to thecargo metadatacommand.Thanks to anforowicz for your first contribution!
-
-
0.17.1309 Feb 2025Release notes
Open source →Changed
- Renamed
PlatformSpec::currenttoPlatformSpec::build_targetto indicate that it is determined at build time, not at runtime. The old method is still available but has been marked deprecated.
- Renamed
-
0.17.1205 Jan 2025Release notes
Open source →Added
Added support for custom sparse registries (
sparse+https://...). Thanks to jonhoo for your first contribution! -
0.17.1123 Dec 2024Release notes
Open source →Added
Added support for the upcoming Cargo resolver version 3: within guppy,
CargoResolverVersion::V3. Resolver version 3 enables MSRV-aware version resolution in Cargo.The portion of dependency resolution that guppy works with (package and feature resolution) happens after dependency versions have been resolved and
Cargo.lockis refreshed. This means that from guppy's perspective, resolver version 3 is the same as version 2, andCargoResolverVersion::V3acts as an alias forCargoResolverVersion::V2. -
0.17.1003 Dec 2024Release notes
Open source →Changed
- Internal dependency update:
cargo_metadataupdated to 0.19.1. - MSRV updated to Rust 1.82.
- Internal dependency update:
-
0.17.903 Dec 2024Release notes
Open source →Fixed
- Graphs can now be generated even if the workspace
Cargo.tomlis within a subdirectory of one of its members. (This is an uncommon situation, but one that is supported by Cargo.)
Changed
- Internal dependency update:
cargo_metadataupdated to 0.19.0.
- Graphs can now be generated even if the workspace
-
0.17.802 Oct 2024Release notes
Open source →Fixed
- Fixed a case of dependency matching with renamed packages (#317).
Changed
- Update
target-specto 3.2.2.
-
0.17.701 Aug 2024 -
0.17.629 Jul 2024 -
0.17.504 Feb 2024Release notes
Open source →Changed
- The
Debugimpl forFeatureSetis now more useful. (PRs welcome to make theDebugimpls for types likePackageSetmore useful as well.) - MSRV updated to Rust 1.73.
Fixed
- Cargo build simulations now consider dev-dependencies of proc-macro crates. Previously, we weren't doing so.
- The
-
0.17.429 Nov 2023 -
0.17.317 Nov 2023 -
0.17.214 Nov 2023Release notes
Open source →Fixed
- Improve
PackageGraphcreation algorithm to address issues like nextest-rs/nextest#1090.
Changed
- MSRV updated to Rust 1.70.
- Improve
-
0.17.129 Jul 2023Release notes
Open source →Added
PackageMetadata::minimum_rust_versionprovides therust-versionfield of a package as aVersion.PackageMetadata::rust_versionhas been deprecated because it returns aVersionReqeven though it actually should be aVersion. In the next major release of guppy, the current definition ofrust_versionwill go away and be replaced withminimum_rust_version.
-
0.17.026 Jun 2023Release notes
Open source →Changed
target-specupdated to version 3.
Fixed
- Proptest strategy creator names updated from
prop010_toproptest1_.
-
0.16.019 Jun 2023 -
0.15.208 Jan 2023Release notes
Open source →Added
PackageMetadata::to_feature_setconverts a single package to aFeatureSet.
Changed
- MSRV updated to Rust 1.62.
-
0.15.105 Dec 2022 -
0.15.007 Nov 2022Release notes
Open source →Changed
guppy::Error::UnknownRegistryNamenow boxes the internalsummaryand is smaller as a result.
-
0.14.425 Oct 2022 -
0.14.330 Sep 2022Release notes
Open source →Changed
- Repository location update.
- MSRV updated to Rust 1.58.
Thanks to Carol Nichols for her contributions to this release!
-
0.14.229 May 2022Release notes
Open source →Fixed
- On Windows, guppy now behaves correctly when a path dependency is on a different drive from the workspace (#642).
Changed
- Internal dependency updates.
-
0.14.118 Mar 2022Release notes
Open source →Added
Workspace::target_directoryreturns the target directory provided in the Cargo metadata.Workspace::metadata_tablereturns the freeformworkspace.metadatatable.
-
0.14.015 Mar 2022Release notes
Open source →Added
Support for weak dependencies and namespaced features:
- Cargo build simulations now take into account weak dependencies and namespaced features.
- Optional dependencies (
"dep:foo") and namespaced features ("foo") are now represented as separate nodes in aFeatureGraph, even with Rust versions prior to 1.60. - Feature names are now represented as a new
FeatureLabelenum.
Changed
- MSRV updated to Rust 1.56.
-
0.13.013 Feb 2022Release notes
Open source →Added
doc_cfg-based feature labels to rustdoc.MetadataCommand::cargo_commandreturns the underlyingstd::process::Commandinstance.
Changed
guppy::graph::feature::CrossLinkrenamed toConditionalLink, and now covers some same-package features. For more, see the documentation forConditionalLink.- Public dependency bump:
target-specupdated to version 1.
Fixed
- A small fix to Cargo build simulations (#596).
-
0.12.620 Dec 2021Release notes
Open source →Added
PackageMetadata::homepage,documentationanddefault_run, exposed by newer versions of Cargo.
-
0.12.517 Dec 2021Release notes
Open source →Added
guppynow supports a "light" mode if--no-depsis passed in. This mode doesn't provide any information about third-party packages or dependency edges, but is much faster if the only information needed is workspace lookups.
-
0.12.408 Dec 2021 -
0.12.329 Nov 2021 -
0.12.226 Nov 2021Release notes
Open source →Added
PackageMetadata::link_between,link_fromandlink_tolook up a direct link from one package to another.
-
0.12.124 Nov 2021Release notes
Open source →Changed
- The
tomlcrate is now built with thepreserve_orderfeature.- This feature ensures that the key ordering in metadata is preserved.
- The
-
0.12.023 Nov 2021Release notes
Open source →This is a minor breaking change that should not affect most consumers.
Fixed
- Summaries generated by old versions of
guppycan now be parsed by this version, even if the metadata is in a different format.
Changed
- Relative paths are now stored and presented with forward slashes on all platforms, including Windows.
guppy-summariesupdated to 0.6.0.
- Summaries generated by old versions of
-
0.11.320 Nov 2021Release notes
Open source →Added
PackageMetadata::rust_versionreturns thepackage.rust-versionfield, if specified. Thanks @foresterre!
-
0.11.207 Oct 2021Release notes
Open source →Added
- Rudimentary support for alternate registries. This is a temporary workaround until Cargo issue #9052
is resolved.
- This is currently only hooked up to
hakari.
- This is currently only hooked up to
- Rudimentary support for alternate registries. This is a temporary workaround until Cargo issue #9052
is resolved.
-
0.11.101 Oct 2021Release notes
Open source →Added
- A new abstraction
PlatformSpeccan represent the union of all platforms, the intersection of all platforms, or a single platform.- Methods like
EnabledStatus::required_onandEnabledStatus::enabled_onhave been switched to accepting a&PlatformSpecrather than a&Platform. CargoOptions::set_platformand related methods now accept either aPlatformor aPlatformSpec.EnabledStatus::enabled_on_anyis nowEnabledStatus::enabled_on(&PlatformSpec::Any).
- Methods like
- Omitted packages are now easier to describe while deserializing: they now take a
workspace-memberslist of names, and athird-partylist of specifiers such as{ name = "serde", version = "1" }.- The resolver will now also fail if any specifiers are unmatched.
Changed
- Platform-related types have been moved into the new
platformmodule at the top level. - In Cargo options summaries,
version = "v1"andversion = "v2"have been renamed toresolver = "1"andresolver = "2"respectively, to align with Cargo.- The old specifiers will continue to work.
- Because of the changes to how omitted packages are represented, old-style
CargoOptionsSummaryinstances may no longer parse correctly. - MSRV updated to Rust 1.53.
- A new abstraction
-
0.11.001 Oct 2021 withdrawn -
0.10.114 Sep 2021Release notes
Open source →Changed
- Public dependency version bumps:
target-specupdated to 0.8.0.- As a result,
Platformno longer has a lifetime parameter.
- As a result,
guppy-summariesupdated to 0.5.0.semverupdated to 1.0.
- MSRV updated to Rust 1.51.
- Public dependency version bumps:
-
0.10.014 Sep 2021 withdrawnRelease notes
Open source →(This release was yanked because
guppy-summariesneeded to be upgraded as well.) -
0.9.011 Mar 2021Release notes
Open source →Added
DependencyKind::VALUESlists out all the values ofDependencyKind.DependencyReq::no_default_features()returns the enabled status for a dependency whendefault-features = false.
Changed
PackageMetadata::publishnow returns a new, more descriptivePackagePublishenum (#320).PackageMetadata::readmenow returns&Utf8Pathrather than&Path.BuildTarget::pathnow returns&Utf8Pathrather than&Path.
-
0.8.024 Feb 2021Release notes
Open source →Changed
guppynow usescaminoUtf8PathandUtf8PathBufwrappers. These wrappers provide type-level assertions that returned paths are valid UTF-8.- Public dependency version bumps:
proptestupdated to version 1 and the corresponding feature renamed toproptest1.
-
0.7.217 Feb 2021Release notes
Open source →Fixed
- Restored compatibility with Rust 1.48. (1.48 is the MSRV, and is now tested in CI.)
-
0.7.114 Feb 2021Release notes
Open source →Changed
- Packages within a cycle are now returned in non-dev order. When the direction is forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, then Foo is returned before Bar. (This is not a breaking change because it is an additional constraint on guppy itself, not on its consumers.)
-
0.7.004 Feb 2021Release notes
Open source →Added
PackageSourcenow has support for parsing external sources through a newparse_externalmethod.- Cargo simulations have some new features:
- New
CargoOptions::set_initials_platformmethod can be used to simulate builds on exclusively the host platform. CargoSet::newaccepts an additional argument,features_only, which represents additional inputs that are only used for feature unification. This may be used to simulate, e.g.cargo build --package foo --package bar, when you only care about the results offoobut specifyingbarinfluences the build.- New enum
graph::cargo::BuildPlatformrepresents either the target platform or the host. New methodsCargoSet::platform_featuresandCargoSet::platform_direct_depsaccept theBuildPlatformenum.
- New
FeatureSet::contains_packagereturns true if a feature set has at least one feature in the given package.semver::VersionReqis now exposed inguppy.FeatureGraph::resolve_idsresolves feature IDs into aFeatureSet.
Changed
- Feature filters
all_filter,default_filterandnone_filterhave been combined into a single enumStandardFeatures. - Cargo builds are now done through
FeatureSetinstances, notFeatureQuery. This is because Cargo builds always happen in the forward direction.FeatureQuery::resolve_cargohas been renamed toFeatureSet::into_cargo_set.
CargoOptions::with_methods have been renamed to begin with eitherset_oradd_.Obsis now a type rather than a trait.CargoOptions::set_proc_macros_on_targetwas replaced withInitialsPlatform::ProcMacrosOnTarget.- Public dependency version bumps:
semverupdated to 0.11.target-specupdated to 0.6.
-
0.6.311 Jan 2021 -
0.6.210 Dec 2020Release notes
Open source →Fixed
-
FeatureGraph::is_default_featureno longer follows cross-package links.Cyclic dev-dependencies can enable non-default features (such as testing-only features), and previously
is_default_featurewould have returned true for such features. With this change,is_default_featurereturns false for such features.The
default_filterfeature filter, which usesis_default_feature, has been fixed as well.
-
-
0.6.102 Dec 2020Release notes
Open source →This includes all the changes from version 0.6.0, plus a minor fix:
Fixed
- Removed "Usage" section from the README, the version number there keeps falling out of sync.
-
0.5.020 Jun 2020Release notes
Open source →This includes the changes in version 0.5.0-rc.1, plus:
Added
- Support for writing out build summaries for
CargoSetinstances through the optionalsummariesfeature.
Changed
target-spechas been upgraded to 0.4.
Fixed
MetadataCommand::execandbuild_graphare now&self, not&mut self.
- Support for writing out build summaries for
-
0.5.0-rc.113 Jun 2020 pre-releaseRelease notes
Open source →Added
PackageGraph::query_workspace_pathsandresolve_workspace_pathsprovide convenient ways to create queries and package sets given a list of workspace paths.PackageMetadata::sourceprovides the source of a package (a local path,crates.io, agitrepository or a custom registry).PackageQuery::initialsreturns the initial set of packages specified in a package query.FeatureQuery::initialsreturns the initial set of features specified in a feature query.FeatureQuery::initial_packagesreturns the initial set of packages specified in a feature query.- Improvements to Cargo resolution:
CargoSetnow carries with it the original query and information about direct third-party dependencies.- A number of bug fixes around edge cases.
Workspace::members_by_pathsandWorkspace::members_by_nameslook up a list of workspace members by path or name, respectively.FeatureGraph::all_features_forreturns a list of all known features for a specified package.
Changed
- Lookup methods like
PackageGraph::metadatanow returnResults with errors instead ofOptions. target-spechas been upgraded to 0.3.proptesthas been upgraded to 0.10. The feature has accordingly been renamed toproptest010.Workspace::membersis nowWorkspace::iter_by_path, andWorkspace::members_by_nameis nowWorkspace::iter_by_name.
Fixed
- In
FeatureQuery<'g>andFeatureSet<'g>, the lifetime parameter'gis now covariant. Compile-time assertions ensure that all lifetime parameters inguppyare covariant.
Upcoming
- Support for build summaries is currently in an experimental state.