|
1 | 1 | # Changelog
|
2 | 2 |
|
3 | 3 | ## Cargo 1.88 (2025-06-26)
|
4 |
| -[a6c604d1...HEAD](https://github.com/rust-lang/cargo/compare/a6c604d1...HEAD) |
| 4 | +[a6c604d1...rust-1.88.0](https://github.com/rust-lang/cargo/compare/a6c604d1...rust-1.88.0) |
5 | 5 |
|
6 | 6 | ### Added
|
7 | 7 |
|
| 8 | +- 🎉 Stabilize automatic garbage collection for global caches. |
| 9 | + |
| 10 | + When building, Cargo downloads and caches crates needed as dependencies. |
| 11 | + Historically, these downloaded files would never be cleaned up, leading to an |
| 12 | + unbounded amount of disk usage in Cargo's home directory. In this version, |
| 13 | + Cargo introduces a garbage collection mechanism to automatically clean up old |
| 14 | + files (e.g. .crate files). Cargo will remove files downloaded from the network |
| 15 | + if not accessed in 3 months, and files obtained from the local system if not |
| 16 | + accessed in 1 month. Note that this automatic garbage collection will not take |
| 17 | + place if running offline (using `--offline` or `--frozen`). |
| 18 | + |
| 19 | + Cargo 1.78 and newer track the access information needed for this garbage |
| 20 | + collection. If you regularly use versions of Cargo older than 1.78, in |
| 21 | + addition to running current versions of Cargo, and you expect to have some |
| 22 | + crates accessed exclusively by the older versions of Cargo and don't want to |
| 23 | + re-download those crates every ~3 months, you may wish to set |
| 24 | + `cache.auto-clean-frequency = "never"` in the Cargo configuration. |
| 25 | + ([docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#cache)) |
| 26 | + [#14287](https://github.com/rust-lang/cargo/pull/14287) |
| 27 | +- Allow boolean literals as cfg predicates in Cargo.toml and configurations. |
| 28 | + For example, `[target.'cfg(not(false))'.dependencies]` is a valid cfg predicate. |
| 29 | + ([RFC 3695](https://github.com/rust-lang/rfcs/pull/3695)) |
| 30 | + [#14649](https://github.com/rust-lang/cargo/pull/14649) |
| 31 | + |
8 | 32 | ### Changed
|
9 | 33 |
|
10 | 34 | - Don't canonicalize executable path for the `CARGO` environment variable.
|
11 | 35 | [#15355](https://github.com/rust-lang/cargo/pull/15355)
|
| 36 | +- Print target and package names formatted as file hyperlinks. |
| 37 | + [#15405](https://github.com/rust-lang/cargo/pull/15405) |
| 38 | +- Make sure library search paths inside `OUT_DIR` precede external paths. |
| 39 | + [#15221](https://github.com/rust-lang/cargo/pull/15221) |
| 40 | +- Suggest similar looking feature names when feature is missing. |
| 41 | + [#15454](https://github.com/rust-lang/cargo/pull/15454) |
| 42 | +- Use `zlib-rs` for gzip (de)compression for `.crate` tarballs. |
| 43 | + [#15417](https://github.com/rust-lang/cargo/pull/15417) |
12 | 44 |
|
13 | 45 | ### Fixed
|
14 | 46 |
|
| 47 | +- build-rs: Correct name of `CARGO_CFG_FEATURE` |
| 48 | + [#15420](https://github.com/rust-lang/cargo/pull/15420) |
15 | 49 | - cargo-tree: Make output more deterministic
|
16 | 50 | [#15369](https://github.com/rust-lang/cargo/pull/15369)
|
| 51 | +- cargo-package: dont fail the entire command when the dirtiness check failed, |
| 52 | + as git status check is mostly informational. |
| 53 | + [#15416](https://github.com/rust-lang/cargo/pull/15416) |
| 54 | + [#15419](https://github.com/rust-lang/cargo/pull/15419) |
17 | 55 |
|
18 | 56 | ### Nightly only
|
19 | 57 |
|
|
22 | 60 | ([docs](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#rustdoc-depinfo))
|
23 | 61 | [#15359](https://github.com/rust-lang/cargo/pull/15359)
|
24 | 62 | [#15371](https://github.com/rust-lang/cargo/pull/15371)
|
| 63 | +- `build-dir`: Added validation for unmatched brackets in build-dir template |
| 64 | + [#15414](https://github.com/rust-lang/cargo/pull/15414) |
| 65 | +- `build-dir`: Improved error message when build-dir template var is invalid |
| 66 | + [#15418](https://github.com/rust-lang/cargo/pull/15418) |
| 67 | +- `build-dir`: Added `build_directory` field to cargo metadata output |
| 68 | + [#15377](https://github.com/rust-lang/cargo/pull/15377) |
| 69 | +- `build-dir`: Added symlink resolution for `workspace-path-hash` |
| 70 | + [#15400](https://github.com/rust-lang/cargo/pull/15400) |
| 71 | +- `build-dir`: Added build_directory to cargo metadata documentation |
| 72 | + [#15410](https://github.com/rust-lang/cargo/pull/15410) |
| 73 | +- `unit-graph`: switch to Package ID Spec. |
| 74 | + [#15447](https://github.com/rust-lang/cargo/pull/15447) |
25 | 75 | - `-Zgc`: Rename the `gc` config table to `[cache]`.
|
26 | 76 | Low-level settings is now under `[cache.global-clean]`.
|
27 | 77 | [#15367](https://github.com/rust-lang/cargo/pull/15367)
|
| 78 | +- `-Zdoctest-xcompile`: Update doctest xcompile flags. |
| 79 | + [#15455](https://github.com/rust-lang/cargo/pull/15455) |
28 | 80 |
|
29 | 81 | ### Documentation
|
30 | 82 |
|
| 83 | +- Mention the convention of kebab-case for Cargo targets naming. |
| 84 | + [#14439](https://github.com/rust-lang/cargo/pull/14439) |
| 85 | +- Use better example value in `CARGO_CFG_TARGET_ABI` |
| 86 | + [#15404](https://github.com/rust-lang/cargo/pull/15404) |
| 87 | + |
31 | 88 | ### Internal
|
32 | 89 |
|
| 90 | +- Fix formatting of CliUnstable parsing |
| 91 | + [#15434](https://github.com/rust-lang/cargo/pull/15434) |
| 92 | +- ci: restore semver-checks for cargo-util |
| 93 | + [#15389](https://github.com/rust-lang/cargo/pull/15389) |
| 94 | +- ci: add aarch64 linux runner |
| 95 | + [#15077](https://github.com/rust-lang/cargo/pull/15077) |
| 96 | +- rustfix: Use `snapbox` for snapshot testing |
| 97 | + [#15429](https://github.com/rust-lang/cargo/pull/15429) |
| 98 | +- test:Prevent undeclared public network access |
| 99 | + [#15368](https://github.com/rust-lang/cargo/pull/15368) |
| 100 | +- Update dependencies. |
| 101 | + [#15373](https://github.com/rust-lang/cargo/pull/15373) |
| 102 | + [#15381](https://github.com/rust-lang/cargo/pull/15381) |
| 103 | + [#15391](https://github.com/rust-lang/cargo/pull/15391) |
| 104 | + [#15394](https://github.com/rust-lang/cargo/pull/15394) |
| 105 | + [#15403](https://github.com/rust-lang/cargo/pull/15403) |
| 106 | + [#15415](https://github.com/rust-lang/cargo/pull/15415) |
| 107 | + [#15421](https://github.com/rust-lang/cargo/pull/15421) |
| 108 | + [#15446](https://github.com/rust-lang/cargo/pull/15446) |
| 109 | + |
| 110 | + |
33 | 111 | ## Cargo 1.87 (2025-05-15)
|
34 | 112 | [ce948f46...rust-1.87.0](https://github.com/rust-lang/cargo/compare/ce948f46...rust-1.87.0)
|
35 | 113 |
|
|
0 commit comments