# cargo

**URL:** https://internals.rust-lang.org/c/tools-and-infrastructure/cargo/15.md

[Latest](https://internals.rust-lang.org/latest.md) · [Categories](https://internals.rust-lang.org/categories.md)

---

## [About the cargo category](https://internals.rust-lang.org/t/about-the-cargo-category/69)

<div class="topic-metadata">

**Author:** [@cmr](https://internals.rust-lang.org/u/cmr)\
**Replies:** 0\
**Last updated:** [July 12, 2014, 2:43am UTC](https://internals.rust-lang.org/t/about-the-cargo-category/69 "2014-07-12T02:43:13Z")

</div>

Discussion about our wonderful package manager, Cargo.

---

## [Attempting to clean up the feature activation syntax?](https://internals.rust-lang.org/t/attempting-to-clean-up-the-feature-activation-syntax/24718)

<div class="topic-metadata">

**Author:** [@epage](https://internals.rust-lang.org/u/epage)\
**Replies:** 11\
**Last updated:** [October 31, 2026, 2:13pm UTC](https://internals.rust-lang.org/t/attempting-to-clean-up-the-feature-activation-syntax/24718 "2026-10-31T14:13:17Z")

</div>

Currently, a feature activation in the manifest can include: "foo": activate the feature foo in the current package "dep:foo": activate the optional dependency foo "foo?/bar": if the optional dependency foo is activate…

---

## [Non-Rust artifact dependencies for build scripts](https://internals.rust-lang.org/t/non-rust-artifact-dependencies-for-build-scripts/24555)

<div class="topic-metadata">

**Author:** [@guineawheek](https://internals.rust-lang.org/u/guineawheek)\
**Replies:** 14\
**Last updated:** [September 2, 2026, 12:32pm UTC](https://internals.rust-lang.org/t/non-rust-artifact-dependencies-for-build-scripts/24555 "2026-09-02T12:32:40Z")

</div>

As detailed in this larger piece surveying build.rs scripts, a lot of build.rs scripts that generate FFI bindings (and thus need to pull in external sources) or need to pull in external corpuses of information (e.g. NLP-…

---

## [Build Security](https://internals.rust-lang.org/t/build-security/24166)

<div class="topic-metadata">

**Author:** [@Dwarsloeper](https://internals.rust-lang.org/u/Dwarsloeper)\
**Replies:** 31\
**Last updated:** [August 27, 2026, 12:32pm UTC](https://internals.rust-lang.org/t/build-security/24166 "2026-08-27T12:32:44Z")

</div>

Rust builds have two Trojan features. Here are thoughts about reigning them in: 1. Build.rs I recall that there was a discussion long ago that the most common tasks could be implemented centrally and activated by config…

---

## [Prerelease versions aren't usable for shared dependencies](https://internals.rust-lang.org/t/prerelease-versions-arent-usable-for-shared-dependencies/23948)

<div class="topic-metadata">

**Author:** [@kornel](https://internals.rust-lang.org/u/kornel)\
**Replies:** 3\
**Last updated:** [August 11, 2026, 6:05pm UTC](https://internals.rust-lang.org/t/prerelease-versions-arent-usable-for-shared-dependencies/23948 "2026-08-11T18:05:46Z")

</div>

Cargo treats version 1.2.0-alpha as strictly incompatible with a ^1.0.0 requirement. Of course it totally makes sense to avoid picking unstable versions by default, but it seems to me it should only be a strong preferen…

---

## [Feature proposal: Links in crate names](https://internals.rust-lang.org/t/feature-proposal-links-in-crate-names/24511)

<div class="topic-metadata">

**Author:** [@Lynnesbian](https://internals.rust-lang.org/u/Lynnesbian)\
**Replies:** 5\
**Last updated:** [August 8, 2026, 2:32pm UTC](https://internals.rust-lang.org/t/feature-proposal-links-in-crate-names/24511 "2026-08-08T14:32:34Z")

</div>

Proposal Cargo outputs crate names when building, updating, downloading, etc. It would be handy to have the names link to the relevant crates.io page using OSC 8 links. Cargo already uses OSC 8 links for HTML file output…

---

## [Can I specify that Cargo’s Git dependencies fetch with \`--depth 1\`?](https://internals.rust-lang.org/t/can-i-specify-that-cargo-s-git-dependencies-fetch-with-depth-1/24492)

<div class="topic-metadata">

**Author:** [@stackinspector](https://internals.rust-lang.org/u/stackinspector)\
**Replies:** 5\
**Last updated:** [July 28, 2026, 11:36am UTC](https://internals.rust-lang.org/t/can-i-specify-that-cargo-s-git-dependencies-fetch-with-depth-1/24492 "2026-07-28T11:36:25Z")

</div>

After a quick search, it seems the answer is no for the current version of Cargo, so I posted this question on IRLO. Since I need to use cksumvfs—a feature not yet officially supported by rusqlite—I created a fork of ru…

---

## [Global, simple, universal RUSTFLAGS](https://internals.rust-lang.org/t/global-simple-universal-rustflags/24454)

<div class="topic-metadata">

**Author:** [@nazar-pc](https://internals.rust-lang.org/u/nazar-pc)\
**Replies:** 5\
**Last updated:** [July 12, 2026, 5:45am UTC](https://internals.rust-lang.org/t/global-simple-universal-rustflags/24454 "2026-07-12T05:45:25Z")

</div>

I have struggled with RUSTFLAGS more than necessary recently and would like to argue that the defaults as very suboptimal. They make simple things unnecessarily hard for something that I don't think is inherently complex…

---

## [Child Thread: Survey of registry namespace designs for Cargo and Crates.io](https://internals.rust-lang.org/t/child-thread-survey-of-registry-namespace-designs-for-cargo-and-crates-io/24030)

<div class="topic-metadata">

**Author:** [@epage](https://internals.rust-lang.org/u/epage)\
**Replies:** 9\
**Last updated:** [July 6, 2026, 1:55pm UTC](https://internals.rust-lang.org/t/child-thread-survey-of-registry-namespace-designs-for-cargo-and-crates-io/24030 "2026-07-06T13:55:29Z")

</div>

For background context and links to other threads, see Survey of organizational ownership and registry namespace designs for Cargo and Crates.io. This thread assumes that one has been read. This thread is for summarizi…

---

## [Child Thread: Survey of organizational ownership designs for Cargo and Crates.io](https://internals.rust-lang.org/t/child-thread-survey-of-organizational-ownership-designs-for-cargo-and-crates-io/24028)

<div class="topic-metadata">

**Author:** [@epage](https://internals.rust-lang.org/u/epage)\
**Replies:** 5\
**Last updated:** [July 6, 2026, 1:55pm UTC](https://internals.rust-lang.org/t/child-thread-survey-of-organizational-ownership-designs-for-cargo-and-crates-io/24028 "2026-07-06T13:55:07Z")

</div>

For background context and links to other threads, see Survey of organizational ownership and registry namespace designs for Cargo and Crates.io. This thread assumes that one has been read. This thread is for summarizi…

---

## [Yanking a crate better than deleting it](https://internals.rust-lang.org/t/yanking-a-crate-better-than-deleting-it/24175)

<div class="topic-metadata">

**Author:** [@RelunSec](https://internals.rust-lang.org/u/RelunSec)\
**Replies:** 5\
**Last updated:** [July 6, 2026, 11:08am UTC](https://internals.rust-lang.org/t/yanking-a-crate-better-than-deleting-it/24175 "2026-07-06T11:08:26Z")

</div>

Hello, Rust Team In security perspective, Yanking a crate on crates.io very better and block the name from attackers or threat actors, reregister deleted crates names and host malicious crates that harm users and users …

---

## [Separating fetching from building for better security](https://internals.rust-lang.org/t/separating-fetching-from-building-for-better-security/24390)

<div class="topic-metadata">

**Author:** [@grothesque](https://internals.rust-lang.org/u/grothesque)\
**Replies:** 21\
**Last updated:** [June 17, 2026, 7:12pm UTC](https://internals.rust-lang.org/t/separating-fetching-from-building-for-better-security/24390 "2026-06-17T19:12:52Z")

</div>

Cargo and rust-analyzer are great, but their convenience comes with some security challenges: Like other language package managers, Cargo is subject to supply-chain attacks; Rust might be particularly exposed in that m…

---

## [Per-package-target feature unification](https://internals.rust-lang.org/t/per-package-target-feature-unification/24349)

<div class="topic-metadata">

**Author:** [@andreasWallner](https://internals.rust-lang.org/u/andreasWallner)\
**Replies:** 2\
**Last updated:** [May 22, 2026, 7:25pm UTC](https://internals.rust-lang.org/t/per-package-target-feature-unification/24349 "2026-05-22T19:25:53Z")

</div>

Hi, For our embedded development workspaces, I was looking forward to using per-package-target... But this issue remaining with that: per-package-target unifies features which can conflict with other targets · Issue #95…

---

## [Hope to improve the error messages of cargo or rustup](https://internals.rust-lang.org/t/hope-to-improve-the-error-messages-of-cargo-or-rustup/24350)

<div class="topic-metadata">

**Author:** [@sakuraflows](https://internals.rust-lang.org/u/sakuraflows)\
**Replies:** 2\
**Last updated:** [May 22, 2026, 2:38am UTC](https://internals.rust-lang.org/t/hope-to-improve-the-error-messages-of-cargo-or-rustup/24350 "2026-05-22T02:38:15Z")

</div>

When I was installing mdbook, the following error suddenly popped up: \\rustbook\_zhcn-main\> cargo install mdbook error: process didn't exit successfully: rustc -vV (exit code: 1) --- stderr error: Missing manifest in too…

---

## [Pre-RFC: Mutually-excusive, global features](https://internals.rust-lang.org/t/pre-rfc-mutually-excusive-global-features/19618)

<div class="topic-metadata">

**Author:** [@epage](https://internals.rust-lang.org/u/epage)\
**Replies:** 53\
**Last updated:** [May 21, 2026, 1:48pm UTC](https://internals.rust-lang.org/t/pre-rfc-mutually-excusive-global-features/19618 "2026-05-21T13:48:39Z")

</div>

This is very hand-wavy and very much targeted at brainstorming. At this stage, what I suspect will be most useful will be Describing where features are not working well or where are you using --cfg Planning for how it…

---

## [\[Pre-RFC\] DNS domains as package namespaces](https://internals.rust-lang.org/t/pre-rfc-dns-domains-as-package-namespaces/24202)

<div class="topic-metadata">

**Author:** [@jmillikin](https://internals.rust-lang.org/u/jmillikin)\
**Replies:** 68\
**Last updated:** [May 7, 2026, 1:14am UTC](https://internals.rust-lang.org/t/pre-rfc-dns-domains-as-package-namespaces/24202 "2026-05-07T01:14:41Z")

</div>

Package namespacing is one of those perennial topics that seems to attract designs but not much implementation. I took my own preferred approach (DNS domains) and got some robots to implement a proof-of-concept. The cod…

---

## [\[Pre-RFC\] Proposal: bound Cargo's implicit upward discovery for config.toml files](https://internals.rust-lang.org/t/pre-rfc-proposal-bound-cargos-implicit-upward-discovery-for-config-toml-files/24210)

<div class="topic-metadata">

**Author:** [@wolfv](https://internals.rust-lang.org/u/wolfv)\
**Replies:** 12\
**Last updated:** [May 1, 2026, 2:34pm UTC](https://internals.rust-lang.org/t/pre-rfc-proposal-bound-cargos-implicit-upward-discovery-for-config-toml-files/24210 "2026-05-01T14:34:38Z")

</div>

Proposal: bound Cargo's implicit upward discovery Cargo currently walks from cwd toward filesystem root when discovering .cargo/config.toml. That is useful interactively, but tools do not have a supported way to say "onl…

---

## [Easily inspect dependencies](https://internals.rust-lang.org/t/easily-inspect-dependencies/24200)

<div class="topic-metadata">

**Author:** [@Rudxain](https://internals.rust-lang.org/u/Rudxain)\
**Replies:** 8\
**Last updated:** [April 29, 2026, 3:21am UTC](https://internals.rust-lang.org/t/easily-inspect-dependencies/24200 "2026-04-29T03:21:25Z")

</div>

Cargo should provide a way for users to trivially find and/or open locally-cached crates. The current UX discourages cding or opening deps: # using Rust fmt-str syntax open ".cargo/registry/src/index.crates.io-{HEX\_NONS…

---

## [\[Pre-RFC\] \`cargo package\` should include fewer files by default](https://internals.rust-lang.org/t/pre-rfc-cargo-package-should-include-fewer-files-by-default/24188)

<div class="topic-metadata">

**Author:** [@SwishSwushPow](https://internals.rust-lang.org/u/SwishSwushPow)\
**Replies:** 38\
**Last updated:** [April 28, 2026, 7:13am UTC](https://internals.rust-lang.org/t/pre-rfc-cargo-package-should-include-fewer-files-by-default/24188 "2026-04-28T07:13:39Z")

</div>

Hi everyone! I was thinking about opening an RFC and wanted to test the waters here a little bit. :slight\_smile: In short, I want to propose that we limit the files that are packaged by cargo package by default before u…

---

## [Cargo project config unification](https://internals.rust-lang.org/t/cargo-project-config-unification/24082)

<div class="topic-metadata">

**Author:** [@zackw](https://internals.rust-lang.org/u/zackw)\
**Replies:** 4\
**Last updated:** [March 14, 2026, 11:37pm UTC](https://internals.rust-lang.org/t/cargo-project-config-unification/24082 "2026-03-14T23:37:54Z")

</div>

Where are we at on merging .cargo/config.toml into Cargo.toml?

---

## [Optional features are part of the crate — the project should say so](https://internals.rust-lang.org/t/optional-features-are-part-of-the-crate-the-project-should-say-so/24069)

<div class="topic-metadata">

**Author:** [@tomveens](https://internals.rust-lang.org/u/tomveens)\
**Replies:** 20\
**Last updated:** [March 13, 2026, 10:33am UTC](https://internals.rust-lang.org/t/optional-features-are-part-of-the-crate-the-project-should-say-so/24069 "2026-03-13T10:33:28Z")

</div>

When a crate defines an optional feature like mock, and there's a module behind #\[cfg(feature = "mock")\], that code is part of the crate. It compiles. It’s tested. It’s documented. It’s not an afterthought — it’s intenti…

---

## [Alternative to \`cargo new\` templates: examples as build-target templates](https://internals.rust-lang.org/t/alternative-to-cargo-new-templates-examples-as-build-target-templates/24047)

<div class="topic-metadata">

**Author:** [@epage](https://internals.rust-lang.org/u/epage)\
**Replies:** 14\
**Last updated:** [March 6, 2026, 3:14pm UTC](https://internals.rust-lang.org/t/alternative-to-cargo-new-templates-examples-as-build-target-templates/24047 "2026-03-06T15:14:34Z")

</div>

Looking for thoughts on an alternative idea to what we normally think of as templates for cargo new and some brainstorming on the CLI. From both the Cargo team and the community, there has long been an interest to havin…

---

## [Child Thread: Survey of alternative identifier designs for Cargo and Crates.io](https://internals.rust-lang.org/t/child-thread-survey-of-alternative-identifier-designs-for-cargo-and-crates-io/24029)

<div class="topic-metadata">

**Author:** [@epage](https://internals.rust-lang.org/u/epage)\
**Replies:** 13\
**Last updated:** [March 1, 2026, 2:49pm UTC](https://internals.rust-lang.org/t/child-thread-survey-of-alternative-identifier-designs-for-cargo-and-crates-io/24029 "2026-03-01T14:49:44Z")

</div>

For background context and links to other threads, see Survey of organizational ownership and registry namespace designs for Cargo and Crates.io. This thread assumes that one has been read. This thread is for summarizi…

---

## [Survey of organizational ownership and registry namespace designs for Cargo and Crates.io](https://internals.rust-lang.org/t/survey-of-organizational-ownership-and-registry-namespace-designs-for-cargo-and-crates-io/24027)

<div class="topic-metadata">

**Author:** [@epage](https://internals.rust-lang.org/u/epage)\
**Replies:** 3\
**Last updated:** [February 23, 2026, 3:10pm UTC](https://internals.rust-lang.org/t/survey-of-organizational-ownership-and-registry-namespace-designs-for-cargo-and-crates-io/24027 "2026-02-23T15:10:14Z")

</div>

Every once in a while, namespacing support on crates.io comes up among many different use cases. This is an attempt to collect the information on this topic to reduce the conversations from falling into spinning in circl…

---

## [Federated Registries?](https://internals.rust-lang.org/t/federated-registries/23996)

<div class="topic-metadata">

**Author:** [@Dwarsloeper](https://internals.rust-lang.org/u/Dwarsloeper)\
**Replies:** 4\
**Last updated:** [February 11, 2026, 11:23pm UTC](https://internals.rust-lang.org/t/federated-registries/23996 "2026-02-11T23:23:50Z")

</div>

We are struggling with how to set up cargo. The way we publish things inhouse, the cleanest would be one registry per internal organisation. Artifactory has federated registries for other languages but not for cargo. Thi…

---

## [Should there be a way to override the version of patched crates?](https://internals.rust-lang.org/t/should-there-be-a-way-to-override-the-version-of-patched-crates/23956)

<div class="topic-metadata">

**Author:** [@crumblingstatue](https://internals.rust-lang.org/u/crumblingstatue)\
**Replies:** 2\
**Last updated:** [January 24, 2026, 10:39pm UTC](https://internals.rust-lang.org/t/should-there-be-a-way-to-override-the-version-of-patched-crates/23956 "2026-01-24T22:39:13Z")

</div>

\[patch\] is super useful when you want to test bug fixes and new features for your library crate, since you can integrate the in-development version into your complex project. I used to bump the version number of a crate…

---

## [Is it possible to standardize additional config file naming?](https://internals.rust-lang.org/t/is-it-possible-to-standardize-additional-config-file-naming/23900)

<div class="topic-metadata">

**Author:** [@DidingasLushis](https://internals.rust-lang.org/u/DidingasLushis)\
**Replies:** 5\
**Last updated:** [January 15, 2026, 4:22am UTC](https://internals.rust-lang.org/t/is-it-possible-to-standardize-additional-config-file-naming/23900 "2026-01-15T04:22:16Z")

</div>

My projects often have: ├── .cargo/ │ └── config.toml ├── Cargo.toml ├── src/ ├── rustfmt.toml └── rust-toolchain.toml Having files of different names scheme (ex: rustfmt.toml not rust-fmt.toml like rust-toolchain…

---

## [\`\[features\]\` in Cargo.toml should be allowed to have a description](https://internals.rust-lang.org/t/features-in-cargo-toml-should-be-allowed-to-have-a-description/23905)

<div class="topic-metadata">

**Author:** [@idanarye](https://internals.rust-lang.org/u/idanarye)\
**Replies:** 2\
**Last updated:** [January 7, 2026, 2:20am UTC](https://internals.rust-lang.org/t/features-in-cargo-toml-should-be-allowed-to-have-a-description/23905 "2026-01-07T02:20:01Z")

</div>

(I see that this was suggested in the past, but that post has no comments and got auto-closed: \[Pre-RFC\] Rust and features (cargo) discoverability) Currently there is no standard way to document features. At most, you m…

---

## [\`cargo install --locked\` or not locked middle ground?](https://internals.rust-lang.org/t/cargo-install-locked-or-not-locked-middle-ground/23893)

<div class="topic-metadata">

**Author:** [@kornel](https://internals.rust-lang.org/u/kornel)\
**Replies:** 11\
**Last updated:** [January 6, 2026, 4:09pm UTC](https://internals.rust-lang.org/t/cargo-install-locked-or-not-locked-middle-ground/23893 "2026-01-06T16:09:25Z")

</div>

cargo install crate-cli has a dilemma: Respecting the crate's lockfile makes dependencies more predictable, match what the crate author has tested with, and less likely to break due to semver violations in dependency …

---

## [Optimistic \`cargo run\` for faster compile/iteration times](https://internals.rust-lang.org/t/optimistic-cargo-run-for-faster-compile-iteration-times/23857)

<div class="topic-metadata">

**Author:** [@DragonDev1906](https://internals.rust-lang.org/u/DragonDev1906)\
**Replies:** 6\
**Last updated:** [December 31, 2025, 1:17pm UTC](https://internals.rust-lang.org/t/optimistic-cargo-run-for-faster-compile-iteration-times/23857 "2025-12-31T13:17:50Z")

</div>

The best optimization is if you don't have to do something, but I think we can all agree that there is not much that can/should be removed. We do want a lot of compile time checks. But what if we could do these later \[1…

[Next page](https://internals.rust-lang.org/c/tools-and-infrastructure/cargo/15.md?page=1)
