20619 Commits

Author SHA1 Message Date
Weihang Lo
ee515e6def
docs: Add Lockfile schemas docs (#15989)
### What does this PR try to resolve?

Add documentation efforts to the lockfile schemas.

Continuation of #15980

### How to test and review this PR?
2025-09-20 01:40:06 +00:00
Vito Secona
9730a3724f docs: add doc comments to lockfile schemas 2025-09-20 08:09:16 +07:00
Vito Secona
c384761adb refactor: rearrange definitions
Moves struct definitions and impls closer together to make reading
easier
2025-09-20 07:59:21 +07:00
Eric Huss
5818dcdfdf
Add parallel frontend to the build performance guide (#15970)
This extends the build performance guide in the Cargo book with the
parallel frontend. This is the first mechanism we have in the guide that
is not configured via profiles (unless we want to advertise setting
`rustflags` through profiles?), but rather through `RUSTFLAGS`. Which
means that we have to explain how to do that.

I proposed using footnotes for this, so that we can reuse them also for
other thing (such as explaining how to change a profile). An alternative
would be to have a short paragraph at the beginning of the configuration
subsection where we explain all the possible ways of configuring things,
and then we refer to them.

This is a follow up to #15924

r? @epage
2025-09-19 23:18:54 +00:00
Ed Page
afb508e358
chore(deps): update msrv (3 versions) to v1.88 (#15988)
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://redirect.github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Update | Change | Pending |
|---|---|---|---|
| [MSRV:3](https://redirect.github.com/rust-lang/rust) | minor | `1.87`
-> `1.88` | `1.90` (+1) |

---

### Release Notes

<details>
<summary>rust-lang/rust (MSRV:3)</summary>

###
[`v1.88`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1880-2025-06-26)

[Compare
Source](https://redirect.github.com/rust-lang/rust/compare/1.87.0...1.88.0)

\==========================

<a id="1.88.0-Language"></a>

## Language

- [Stabilize `#![feature(let_chains)]` in the 2024
edition.](https://redirect.github.com/rust-lang/rust/pull/132833)
This feature allows `&&`-chaining `let` statements inside `if` and
`while`, allowing intermixture with boolean expressions. The patterns
inside the `let` sub-expressions can be irrefutable or refutable.
- [Stabilize
`#![feature(naked_functions)]`.](https://redirect.github.com/rust-lang/rust/pull/134213)
Naked functions allow writing functions with no compiler-generated
epilogue and prologue, allowing full control over the generated assembly
for a particular function.
- [Stabilize
`#![feature(cfg_boolean_literals)]`.](https://redirect.github.com/rust-lang/rust/pull/138632)
This allows using boolean literals as `cfg` predicates, e.g.
`#[cfg(true)]` and `#[cfg(false)]`.
- [Fully de-stabilize the `#[bench]`
attribute](https://redirect.github.com/rust-lang/rust/pull/134273).
Usage of `#[bench]` without `#![feature(custom_test_frameworks)]`
already triggered a deny-by-default future-incompatibility lint since
Rust 1.77, but will now become a hard error.
- [Add warn-by-default `dangerous_implicit_autorefs` lint against
implicit autoref of raw pointer
dereference.](https://redirect.github.com/rust-lang/rust/pull/123239)
The lint [will be bumped to
deny-by-default](https://redirect.github.com/rust-lang/rust/pull/141661)
in the next version of Rust.
- [Add `invalid_null_arguments` lint to prevent invalid usage of null
pointers.](https://redirect.github.com/rust-lang/rust/pull/119220)
  This lint is uplifted from `clippy::invalid_null_ptr_usage`.
- [Change trait impl candidate preference for builtin impls and trivial
where-clauses.](https://redirect.github.com/rust-lang/rust/pull/138176)
- [Check types of generic const parameter
defaults](https://redirect.github.com/rust-lang/rust/pull/139646)

<a id="1.88.0-Compiler"></a>

## Compiler

- [Stabilize `-Cdwarf-version` for selecting the version of DWARF debug
information to
generate.](https://redirect.github.com/rust-lang/rust/pull/136926)

<a id="1.88.0-Platform-Support"></a>

## Platform Support

- [Demote `i686-pc-windows-gnu` to Tier
2.](https://blog.rust-lang.org/2025/05/26/demoting-i686-pc-windows-gnu/)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

[platform-support-doc]:
https://doc.rust-lang.org/rustc/platform-support.html

<a id="1.88.0-Libraries"></a>

## Libraries

- [Remove backticks from `#[should_panic]` test failure
message.](https://redirect.github.com/rust-lang/rust/pull/136160)
- [Guarantee that `[T; N]::from_fn` is generated in order of increasing
indices.](https://redirect.github.com/rust-lang/rust/pull/139099), for
those passing it a stateful closure.
- [The libtest flag `--nocapture` is deprecated in favor of the more
consistent `--no-capture`
flag.](https://redirect.github.com/rust-lang/rust/pull/139224)
- [Guarantee that `{float}::NAN` is a quiet
NaN.](https://redirect.github.com/rust-lang/rust/pull/139483)

<a id="1.88.0-Stabilized-APIs"></a>

## Stabilized APIs

-
[`Cell::update`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.update)
- [`impl Default for *const
T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*const+T)
- [`impl Default for *mut
T`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#impl-Default-for-*mut+T)
-
[`HashMap::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html#method.extract_if)
-
[`HashSet::extract_if`](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.extract_if)
-
[`hint::select_unpredictable`](https://doc.rust-lang.org/stable/std/hint/fn.select_unpredictable.html)
-
[`proc_macro::Span::line`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.line)
-
[`proc_macro::Span::column`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.column)
-
[`proc_macro::Span::start`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.start)
-
[`proc_macro::Span::end`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.end)
-
[`proc_macro::Span::file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.file)
-
[`proc_macro::Span::local_file`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.local_file)
-
[`<[T]>::as_chunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks)
-
[`<[T]>::as_chunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_mut)
-
[`<[T]>::as_chunks_unchecked`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked)
-
[`<[T]>::as_chunks_unchecked_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked_mut)
-
[`<[T]>::as_rchunks`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks)
-
[`<[T]>::as_rchunks_mut`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks_mut)
- [`mod
ffi::c_str`](https://doc.rust-lang.org/stable/std/ffi/c_str/index.html)

These previously stable APIs are now stable in const contexts:

-
[`NonNull<T>::replace`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.replace)
- [`<*mut
T>::replace`](https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.replace)
-
[`std::ptr::swap_nonoverlapping`](https://doc.rust-lang.org/stable/std/ptr/fn.swap_nonoverlapping.html)
-
[`Cell::replace`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.replace)
-
[`Cell::get`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.get)
-
[`Cell::get_mut`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.get_mut)
-
[`Cell::from_mut`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.from_mut)
-
[`Cell::as_slice_of_cells`](https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#method.as_slice_of_cells)

<a id="1.88.0-Cargo"></a>

## Cargo

- [Stabilize automatic garbage
collection.](https://redirect.github.com/rust-lang/cargo/pull/14287/)
- [use `zlib-rs` for gzip compression in rust
code](https://redirect.github.com/rust-lang/cargo/pull/15417/)

<a id="1.88.0-Rustdoc"></a>

## Rustdoc

- [Doctests can be ignored based on target names using `ignore-*`
attributes.](https://redirect.github.com/rust-lang/rust/pull/137096)
- [Stabilize the `--test-runtool` and `--test-runtool-arg` CLI options
to specify a program (like qemu) and its arguments to run a
doctest.](https://redirect.github.com/rust-lang/rust/pull/137096)

<a id="1.88.0-Compatibility-Notes"></a>

## Compatibility Notes

- [Finish changing the internal representation of pasted
tokens](https://redirect.github.com/rust-lang/rust/pull/124141). Certain
invalid declarative macros that were previously accepted in obscure
circumstances are now correctly rejected by the compiler. Use of a `tt`
fragment specifier can often fix these macros.
- [Fully de-stabilize the `#[bench]`
attribute](https://redirect.github.com/rust-lang/rust/pull/134273).
Usage of `#[bench]` without `#![feature(custom_test_frameworks)]`
already triggered a deny-by-default future-incompatibility lint since
Rust 1.77, but will now become a hard error.
- [Fix borrow checking some always-true
patterns.](https://redirect.github.com/rust-lang/rust/pull/139042)
The borrow checker was overly permissive in some cases, allowing
programs that shouldn't have compiled.
- [Update the minimum external LLVM to
19.](https://redirect.github.com/rust-lang/rust/pull/139275)
- [Make it a hard error to use a vector type with a non-Rust ABI without
enabling the required target
feature.](https://redirect.github.com/rust-lang/rust/pull/139309)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Every minute ( * * * * * ) (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2025-09-19 20:55:05 +00:00
renovate[bot]
f5a0a0e227
chore(deps): update msrv (3 versions) to v1.88 2025-09-19 20:22:15 +00:00
Ed Page
706cae0796
chore(deps): update msrv (1 version) to v1.90 (#15984)
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://redirect.github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [MSRV:1](https://redirect.github.com/rust-lang/rust) | minor | `1.89`
-> `1.90` |

---

### Release Notes

<details>
<summary>rust-lang/rust (MSRV:1)</summary>

###
[`v1.90`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1900-2025-09-18)

[Compare
Source](https://redirect.github.com/rust-lang/rust/compare/1.89.0...1.90.0)

\===========================

<a id="1.90-Language"></a>

## Language

- [Split up the `unknown_or_malformed_diagnostic_attributes`
lint](https://redirect.github.com/rust-lang/rust/pull/140717). This lint
has been split up into four finer-grained lints, with
`unknown_or_malformed_diagnostic_attributes` now being the lint group
that contains these lints:
  1. `unknown_diagnostic_attributes`: unknown to the current compiler
  2. `misplaced_diagnostic_attributes`: placed on the wrong item
3. `malformed_diagnostic_attributes`: malformed attribute syntax or
options
4. `malformed_diagnostic_format_literals`: malformed format string
literal
- [Allow constants whose final value has references to mutable/external
memory, but reject such constants as
patterns](https://redirect.github.com/rust-lang/rust/pull/140942)
- [Allow volatile access to non-Rust memory, including address
0](https://redirect.github.com/rust-lang/rust/pull/141260)

<a id="1.90-Compiler"></a>

## Compiler

- [Use `lld` by default on
`x86_64-unknown-linux-gnu`](https://redirect.github.com/rust-lang/rust/pull/140525).
- [Tier 3 `musl` targets now link dynamically by
default](https://redirect.github.com/rust-lang/rust/pull/144410).
Affected targets:
  - `mips64-unknown-linux-muslabi64`
  - `powerpc64-unknown-linux-musl`
  - `powerpc-unknown-linux-musl`
  - `powerpc-unknown-linux-muslspe`
  - `riscv32gc-unknown-linux-musl`
  - `s390x-unknown-linux-musl`
  - `thumbv7neon-unknown-linux-musleabihf`

<a id="1.90-Platform-Support"></a>

## Platform Support

- [Demote `x86_64-apple-darwin` to Tier 2 with host
tools](https://redirect.github.com/rust-lang/rust/pull/145252)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

[platform-support-doc]:
https://doc.rust-lang.org/rustc/platform-support.html

<a id="1.90-Libraries"></a>

## Libraries

- [Stabilize
`u*::{checked,overflowing,saturating,wrapping}_sub_signed`](https://redirect.github.com/rust-lang/rust/issues/126043)
- [Allow comparisons between `CStr`, `CString`, and
`Cow<CStr>`](https://redirect.github.com/rust-lang/rust/pull/137268)
- [Remove some unsized tuple impls since unsized tuples can't be
constructed](https://redirect.github.com/rust-lang/rust/pull/138340)
- [Set `MSG_NOSIGNAL` for
`UnixStream`](https://redirect.github.com/rust-lang/rust/pull/140005)
- [`proc_macro::Ident::new` now supports
`$crate`.](https://redirect.github.com/rust-lang/rust/pull/141996)
- [Guarantee the pointer returned from `Thread::into_raw` has at least 8
bytes of
alignment](https://redirect.github.com/rust-lang/rust/pull/143859)

<a id="1.90-Stabilized-APIs"></a>

## Stabilized APIs

-
[`u{n}::checked_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.checked_sub_signed)
-
[`u{n}::overflowing_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.overflowing_sub_signed)
-
[`u{n}::saturating_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.saturating_sub_signed)
-
[`u{n}::wrapping_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.wrapping_sub_signed)
- [`impl Copy for
IntErrorKind`](https://doc.rust-lang.org/stable/std/num/enum.IntErrorKind.html#impl-Copy-for-IntErrorKind)
- [`impl Hash for
IntErrorKind`](https://doc.rust-lang.org/stable/std/num/enum.IntErrorKind.html#impl-Hash-for-IntErrorKind)
- [`impl PartialEq<&CStr> for
CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3C%26CStr%3E-for-CStr)
- [`impl PartialEq<CString> for
CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3CCString%3E-for-CStr)
- [`impl PartialEq<Cow<CStr>> for
CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3CCow%3C'_,+CStr%3E%3E-for-CStr)
- [`impl PartialEq<&CStr> for
CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3C%26CStr%3E-for-CString)
- [`impl PartialEq<CStr> for
CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3CCStr%3E-for-CString)
- [`impl PartialEq<Cow<CStr>> for
CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3CCow%3C'_,+CStr%3E%3E-for-CString)
- [`impl PartialEq<&CStr> for
Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3C%26CStr%3E-for-Cow%3C'_,+CStr%3E)
- [`impl PartialEq<CStr> for
Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3CCStr%3E-for-Cow%3C'_,+CStr%3E)
- [`impl PartialEq<CString> for
Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3CCString%3E-for-Cow%3C'_,+CStr%3E)

These previously stable APIs are now stable in const contexts:

-
[`<[T]>::reverse`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.reverse)
-
[`f32::floor`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.floor)
-
[`f32::ceil`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.ceil)
-
[`f32::trunc`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.trunc)
-
[`f32::fract`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.fract)
-
[`f32::round`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round)
-
[`f32::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round_ties_even)
-
[`f64::floor`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.floor)
-
[`f64::ceil`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.ceil)
-
[`f64::trunc`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.trunc)
-
[`f64::fract`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.fract)
-
[`f64::round`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round)
-
[`f64::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round_ties_even)

<a id="1.90-Cargo"></a>

## Cargo

- [Add `http.proxy-cainfo` config for proxy
certs](https://redirect.github.com/rust-lang/cargo/pull/15374/)
- [Use `gix` for `cargo
package`](https://redirect.github.com/rust-lang/cargo/pull/15534/)
- [feat(publish): Stabilize multi-package
publishing](https://redirect.github.com/rust-lang/cargo/pull/15636/)

<a id="1.90-Rustdoc"></a>

## Rustdoc

- [Add ways to collapse all impl
blocks](https://redirect.github.com/rust-lang/rust/pull/141663).
Previously the "Summary" button and "-" keyboard shortcut would never
collapse `impl` blocks, now they do when shift is held
- [Display unsafe attributes with `unsafe()`
wrappers](https://redirect.github.com/rust-lang/rust/pull/143662)

<a id="1.90-Compatibility-Notes"></a>

## Compatibility Notes

- [Use `lld` by default on
`x86_64-unknown-linux-gnu`](https://redirect.github.com/rust-lang/rust/pull/140525).
See also
<https://blog.rust-lang.org/2025/09/01/rust-lld-on-1.90.0-stable/>.
- [Make `core::iter::Fuse`'s `Default` impl construct `I::default()`
internally as promised in the docs instead of always being
empty](https://redirect.github.com/rust-lang/rust/pull/140985)
- [Set `MSG_NOSIGNAL` for
`UnixStream`](https://redirect.github.com/rust-lang/rust/pull/140005)
This may change program behavior but results in the same behavior as
other primitives (e.g., stdout, network sockets).
Programs relying on signals to terminate them should update handling of
sockets to handle errors on write by exiting.
- [On Unix `std::env::home_dir` will use the fallback if the `HOME`
environment variable is
empty](https://redirect.github.com/rust-lang/rust/pull/141840)
- We now [reject unsupported `extern "{abi}"`s consistently in all
positions](https://redirect.github.com/rust-lang/rust/pull/142134). This
primarily affects the use of implementing traits on an `extern "{abi}"`
function pointer, like `extern "stdcall" fn()`, on a platform that
doesn't support that, like aarch64-unknown-linux-gnu. Direct usage of
these unsupported ABI strings by declaring or defining functions was
already rejected, so this is only a change for consistency.
- [const-eval: error when initializing a static writes to that
static](https://redirect.github.com/rust-lang/rust/pull/143084)
- [Check that the `proc_macro_derive` macro has correct arguments when
applied to the crate
root](https://redirect.github.com/rust-lang/rust/pull/143607)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Every minute ( * * * * * ) (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
2025-09-19 19:14:18 +00:00
Ed Page
3f19ccf75d chore: Bump versions 2025-09-19 13:21:35 -05:00
Jakub Beránek
a887a25565
Add parallel frontend to the build performance guide 2025-09-19 20:08:45 +02:00
Jakub Beránek
5f0328fa7c
Add link to -Zcodegen-backend feature 2025-09-19 20:08:32 +02:00
renovate[bot]
82f655b1e1
chore(deps): update msrv (1 version) to v1.90 2025-09-19 16:45:43 +00:00
Ed Page
24ef070a95
feat(cargo-util-schemas): Move lockfile schemas (#15980)
### What does this PR try to resolve?

As part of cargo plumbing commands, we're trying to make lockfiles more
accessible to third-party uses. This change moves the lockfile schemas
to `cargo-util-schemas`, where it is previously under `cargo` and are
relatively hidden.

See also: https://github.com/crate-ci/cargo-plumbing/issues/82

### How to test and review this PR?

Commit by commit to see the changes made. My main concern is performance
as the implementation repeatedly calls `SourceId::from_url` and I'm not
sure if its negligible.

r? @epage
2025-09-19 16:13:01 +00:00
Weihang Lo
a4bd03c92d
Clarify multiple version requirement behavior (#15979)
Clarify handling of multiple version requirements of disjoint regions

### What does this PR try to resolve?

Resolves a gap in the existing documentation around the dependency
specification for multiple version requirements.

### How to test and review this PR?

As only an update to the cargo book, review should be straightforward
2025-09-19 01:39:17 +00:00
Vito Secona
703988f0c2 refactor: rename lockfile schemas scheme
Manifests schemas use `TomlManifest`. To match, we rename the lockfile
schemas to `TomlLockfile`
2025-09-19 06:05:02 +07:00
Vito Secona
d51d7f6cfc chore: bump version 2025-09-19 05:40:17 +07:00
Vito Secona
3738481c5b feat: add lockfile schema generation 2025-09-19 05:36:02 +07:00
Vito Secona
949e863cb9 refactor: move lockfile schemas to cargo-util-schemas 2025-09-19 01:15:32 +07:00
Vito Secona
efc42e1342 refactor: change imports of encode
simplifies the moving over of the schemas
2025-09-19 01:07:38 +07:00
Vito Secona
535f7730fa refactor: define lockfile errors in cargo-util-schemas
Some of the fields are made public to make the moving phase easier. They
will be reverted back to private when its done moving over.
2025-09-19 00:49:25 +07:00
Vito Secona
982ee85b2e refactor: make certain fields and methods public 2025-09-19 00:49:24 +07:00
Vito Secona
ef7814f399 refactor: replace SourceId in EncodableSourceId 2025-09-19 00:48:32 +07:00
Johnathan Raymond
43fcd7399f
Accept review comments
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2025-09-18 09:36:43 -07:00
Weihang Lo
c99149af54
Adds ghostty as supported terminal for term integration (OSC 9;4) (#15977)
### What does this PR try to resolve?

Adds ghostty to the list of terminals that support OSC 9;4
This is supported as of Ghostty 1.2.0 (released on September 15, 2025)

https://ghostty.org/docs/install/release-notes/1-2-0#graphical-progress-bars

### How to test and review this PR?

I just compiled cargo, then used the new cargo to try to build the repo
(with another target so it actually compiled)
Ex:
`./target/debug/cargo build --target aarch64-apple-ios`

The progress bar can be seen in the top of the terminal:
<img width="833" height="585" alt="image"
src="https://github.com/user-attachments/assets/494a03fe-c337-4935-9ac3-0b0144f47b2f"
/>
2025-09-18 01:55:13 +00:00
Johnathan Raymond
65e5c9fa58
Update documentation on version requirements
Clarify handling of multiple version requirements of disjoint regions
2025-09-17 16:54:13 -07:00
Ethan Budd
0f380eff58
add ghostty as supported terminal for term integration 2025-09-17 08:35:50 -07:00
Weihang Lo
ca8d20d578
docs(team): Fixed broken office hours link (#15976)
I noticed that the office hours link in
https://doc.crates.io/contrib/team.html#meetings is dead.
2025-09-17 15:25:29 +00:00
Ross Sullivan
4c5de695d8
docs(team): Fixed broken office hours link 2025-09-17 23:49:09 +09:00
Ed Page
e0e1a6e27f
docs: Clarify git sources vs git registries in source replacement documentation (#15974)
### What does this PR try to resolve?

This PR addresses confusion in the documentation around git sources and
git registries that has been causing frustrating user experiences. The
current documentation is unclear about the purpose of git sources and
doesn't mention that they're not usable for replacing registries,
leading users to mistakenly assume git sources can replace registries
using the git protocol.

Fixes #15971

### How to test and review this PR?

- Documentation build verification: Ensure the markdown renders
correctly and all cross-references work
- Link validation: Verify all new reference links point to existing
documentation sections
- Content accuracy: Confirm technical explanations are correct and align
with Cargo's actual behavior
2025-09-16 21:13:39 +00:00
anshumancanrock
c440e216a8 docs: clarify git sources vs git registries in source-replacement.md 2025-09-17 02:07:33 +05:30
Eric Huss
966f94733b
fix(frontmatter): Improve error quality (#15972)
### What does this PR try to resolve?

The wording for our errors was indirect and things weren't as clear
without more context.

### How to test and review this PR?

### Notes

Example of rustc's versions of these errors:

1

> ```
> error: unclosed frontmatter
>   --> $DIR/frontmatter-whitespace-2.rs:1:1
>    |
> LL | / ---cargo
> ...  |
> LL | |
>    | |_^
>    |
> note: frontmatter opening here was not closed
>   --> $DIR/frontmatter-whitespace-2.rs:1:1
>    |
> LL | ---cargo
>    | ^^^
> ```

2

> ```
> error: extra characters after frontmatter close are not allowed
>   --> $DIR/extra-after-end.rs:2:1
>    |
> LL | ---cargo
>    | ^^^^^^^^
> ```

3

> ```
> error: frontmatter close does not match the opening
>   --> $DIR/mismatch-1.rs:1:1
>    |
> LL |   ---cargo
>    |   ^--
>    |   |
>    |  _the opening here has 3 dashes...
>    | |
> LL | |
> LL | | ----
>    | |_---^
>    |   |
>    |   ...while the close has 4 dashes
> ```
2025-09-16 17:24:45 +00:00
Ed Page
b674a60384 fix(frontmatter): Be more specific about trailing character span 2025-09-16 11:43:20 -05:00
Ed Page
5b4d0cfad8 fix(frontmatter): Add more visible context to errors 2025-09-16 11:38:03 -05:00
Ed Page
640e12cdfc refactor(frontmatter): Pull out common span 2025-09-16 11:29:53 -05:00
Ed Page
bc75590ae4
fix: wrong variable name in documentation (#15968)
Within a function in the _Constraints and Heuristics_ section, a
variable `pkg_queue` was used, which does not exist. I replaced it with
similiarly named `dep_queue`, as I believe that is what was meant.
2025-09-16 16:26:52 +00:00
Ed Page
42027af706 refactor(frontmatter): Clarify the span 2025-09-16 11:12:54 -05:00
Ed Page
b6326d3255 fix(frontmatter): Have too few error match too many on close 2025-09-16 11:10:32 -05:00
Ed Page
0cbd02f093 fix(fontmatter): Specialize the extra frontmatter close for dashes
For comparison, rustc's message is:

> error: frontmatter close does not match the opening
>   --> $DIR/mismatch-1.rs:1:1
>    |
> LL |   ---cargo
>    |   ^--
>    |   |
>    |  _the opening here has 3 dashes...
>    | |
> LL | |
> LL | | ----
>    | |_---^
>    |   |
>    |   ...while the close has 4 dashes
2025-09-16 11:06:53 -05:00
Ed Page
1b25322d8e fix(frontmatter): Be more direct in trailing close character error
For comparison, the rustc error is:

> error: extra characters after frontmatter close are not allowed
>   --> $DIR/extra-after-end.rs:2:1
>    |
> LL | ---cargo
>    | ^^^^^^^^
2025-09-16 11:06:53 -05:00
Ed Page
60bcd83510 fix(frontmatter): Be more direct in unclosed error
For comparison, rustc's message is:

> error: unclosed frontmatter
>   --> $DIR/frontmatter-whitespace-2.rs:1:1
>    |
> LL | / ---cargo
> ...  |
> LL | |
>    | |_^
>    |
> note: frontmatter opening here was not closed
>   --> $DIR/frontmatter-whitespace-2.rs:1:1
>    |
> LL | ---cargo
>    | ^^^
2025-09-16 11:06:53 -05:00
Ed Page
16d979fca9 fix(manifest): Be more direct in infostring errors 2025-09-15 21:04:21 -05:00
Ed Page
fbe6193f84
Add "Optimizing Build Performance" section to the Cargo book (#15924)
### What does this PR try to resolve?

This PR introduces a new section into the Cargo book, which teaches Rust
users how to optimize the build performance of crates. The motivation
comes from the results of the Compiler performance survey, where people
expressed interest in having an official guide for improving compilation
times.

This has been discussed on
[Zulip](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Build.20performance.20section.20in.20the.20Cargo.20book/with/537603929)
briefly.

### How to test and review this PR?

This is not expected to be complete to avoid a very large PR that gets
blocked on the details over every part. Instead this will be merged
after beta branch with the expectation that it will be sufficiently
filled out by the next beta branch. Initially, we'll be focusing on
content from
https://corrode.dev/blog/tips-for-faster-rust-compile-times/.

[Rendered](https://github.com/Kobzol/cargo/blob/performance-guide/src/doc/src/guide/build-performance.md)
2025-09-15 13:19:54 +00:00
Paul Buehne
b3fe255123
fix: wrong variable name in documentation
Within a function in the _Constraints and Heuristics_ section, a variable `pkg_queue` was used, which does not exist. I replaced it with similiarly named `dep_queue`, as I believe that is what was meant.
2025-09-15 11:09:23 +02:00
Vito Secona
6a97f6469a refactor: inline EncodableSourceId deserialization 2025-09-14 09:04:53 +07:00
Weihang Lo
1194cda240
Remove extra apostrophe in environment-variables.md (#15963)
### What does this PR try to resolve?

I think this extra apostrophe is a typo and should be removed.
2025-09-14 00:27:52 +00:00
Justin Yao Du
bc56fba2c6
Remove extra apostrophe in environment-variables.md 2025-09-13 13:52:18 -07:00
Weihang Lo
32497862ac
Clarify warning for using features or default-features in patch (#15953)
### What does this PR try to resolve?

When attempting to substitute a local version of a dependency, since the
`patch` section uses syntax similar to a dependency (and the
documentation even says "The syntax is similar to the `[dependencies]`
section", it's natural to assume that other things from `[dependencies]`
also work, such as `features` or `default-features`. Attempting to use
them produces this warning:

> patch for `crate-name-here` uses the features mechanism.
> default-features and features will not take effect because the patch
dependency does not support this mechanism

The phrasing "the patch dependency does not support this mechanism"
makes it seem at first glance like `patch` just doesn't support this at
all. But the actual problem is that the user needs to move the
`features`/`default-features` keys to an entry in `dependencies`
instead.

Closes #13522

### How to test and review this PR?

This applies the review feedback from #13522 that the author didn't have
a chance to get back to.
2025-09-13 20:11:08 +00:00
Weihang Lo
5b7c4e3dfc
fix(frontmatter): Try alternative len code fences (#15952)
### What does this PR try to resolve?

Of the non-ideal error cases mentioned in #15939, this is likely the one
people will hit the most and so important for us to improve.

### How to test and review this PR?

Further iteration can show the opening code fence as well to provide
more context for the error.
2025-09-13 13:40:14 +00:00
Weihang Lo
b672b303a1
feat(cli): Allow completions for third-party subcommand names (#15961)
### What does this PR try to resolve?

This will complete the name for third-party subcommands, like
`cargo-release`. This does not complete their args

This is part of #14520.

### How to test and review this PR?
2025-09-13 12:55:56 +00:00
Vito Secona
598cfab7e9 refactor: move out into_resolve from EncodableResolve 2025-09-13 17:53:57 +07:00
Eric Huss
97333185f6
docs(index): Clarify what we mean by omitting features (#15957)
### What does this PR try to resolve?

The current wording (from #14839) makes it sound like new Cargo doesn't
care about the `features` entries when in reality Cargo does care still,
the field is just defaulted.

Closes #15408
### How to test and review this PR?
2025-09-12 19:36:47 +00:00