20616 Commits

Author SHA1 Message Date
Samuel Onoja
5dd597b621
impl workspace hint for boolean dependencies
hint for only bad dependency true literal and rename unit test to match
2025-08-19 18:15:32 +01:00
Samuel Onoja
7e78c54630
initial test commit 2025-08-19 18:15:32 +01:00
Weihang Lo
af9f4f677a
docs: add back src/doc README.md 2025-08-18 18:32:38 -04:00
Weihang Lo
974efef192
docs(contrib): polish documentation guide and make it a chapter 2025-08-18 18:32:37 -04:00
Weihang Lo
bfc0a59ebe
docs(contrib): move docs building process to contributor guide 2025-08-18 18:25:37 -04:00
Ed Page
b2c0aea98d
Switch to using native mdbook fragment redirects (#15861)
Mdbook recently gained the ability to redirect fragments. This removes
the embedded scripts to use this mechanism instead.
2025-08-18 21:49:40 +00:00
Eric Huss
f8dc368fe3 Switch to using native mdbook fragment redirects
Mdbook recently gained the ability to redirect fragments. This removes
the embedded scripts to use this mechanism instead.
2025-08-18 14:21:36 -07:00
Eric Huss
1840e7a507
docs(profile): revert wrong statement of lto options' optimization (#15855)
There is no clear winner between fat LTO and ThinLTO, so don't say "from
most to least optimizing" here.

See https://github.com/rust-lang/cargo/pull/15841#discussion_r2281037386
2025-08-18 17:10:47 +00:00
Ed Page
dd69fab752
docs: avoid ambiguity between update and fetch (#15860)
address
<https://github.com/rust-lang/cargo/pull/15853#discussion_r2282734460>

r? epage
2025-08-18 16:45:29 +00:00
Weihang Lo
33baa940c0
docs: avoid ambiguity between update and fetch 2025-08-18 12:16:36 -04:00
Eric Huss
62537dd3ef
docs: mention how Cargo fetch git submodules (#15853)
### What does this PR try to resolve?

Clarify how git submodules are handled in Cargo for `git` dependencies.

See
https://github.com/rust-lang/cargo/issues/4247#issuecomment-3160707916
2025-08-18 15:21:27 +00:00
Weihang Lo
33cb1c2654
feat(unstable): Added -Zbuild-dir-new-layout unstable feature (#15848)
### What does this PR try to resolve?

Added `-Zbuild-dir-new-layout` unstable feature as part of #15010

I will open a follow up PR with an initial implementation as mentioned
[here](https://github.com/rust-lang/cargo/issues/15010#issuecomment-3193725891)

r? @weihanglo
2025-08-18 05:04:24 +00:00
Weihang Lo
bff04ca05e
docs(profile): revert wrong statement of lto options' optimization
There is no clear winner between fat LTO and ThinLTO,
so don't say "from most to least optimizing" here.

See https://github.com/rust-lang/cargo/pull/15841#discussion_r2281037386
2025-08-17 20:21:11 -04:00
Weihang Lo
206e3fe6b3
Implement host-target substitution (#15838)
### What does this PR try to resolve?

This PR resolves: https://github.com/rust-lang/cargo/issues/13051

Namely, it allows users to invoke cargo subcommands that accept a
`--target` directive to specify the `host` target, which is later
substituted in the command processing layer by the host's real target
triple (for instance, on most Linux distributions, `cargo build --target
host` would effectively run `cargo build --target
x86_64-unknown-linux-gnu`).

This additionally applies to usage within `config.toml`, like so:

```toml
# .cargo/config.toml

[build]
target = "host"
```
2025-08-18 00:01:34 +00:00
zdivelbiss
d5509ebacc
amend documentation style for host target specifier
We also rebuilt the manual pages, to ensure they're up-to-date with the changes made in the `host` target specifier PR.
2025-08-17 14:39:35 -05:00
Weihang Lo
65e7c7a817
docs: mention how Cargo fetch git submodules 2025-08-17 14:59:10 -04:00
zdivelbiss
8f66af7194
simplify tests for host target specifier 2025-08-17 12:54:22 -05:00
zdivelbiss
b23e0a99b2
documentation for host target specifier 2025-08-17 12:52:11 -05:00
zdivelbiss
b3f5e052f6
tests for host target specifier 2025-08-17 12:51:34 -05:00
zdivelbiss
7794d62ced
implement "host" target substitution 2025-08-17 12:51:29 -05:00
Weihang Lo
71eb84f21a
update tests to match lint message changes from rust-lang/rust#140794 (#15849)
Needed for
[rust-lang/rust#140794](https://github.com/rust-lang/rust/pull/140794)
(not merged yet).
2025-08-17 17:18:56 +00:00
Karol Zwolak
cec8eb1d16 bump rustfix version to 0.9.3 2025-08-17 18:50:55 +02:00
Karol Zwolak
fb046a1354 update tests to match lint message changes from rust-lang/rust#140794 2025-08-17 18:50:55 +02:00
Eric Huss
9c7bc45bfa
chore: downgrade to libc@0.2.174 (#15851)
### What does this PR try to resolve?

There is incompatibility between rustix@1.0.8 and libc@0.2.175 that
leads to compilation errors.

See

* https://github.com/bytecodealliance/rustix/issues/1496
* https://github.com/rust-lang/rust/pull/145478#issuecomment-3193494156

### How to test and review this PR?

In rust-lang/rust, update the `src/tools/cargo` submodule accordingly,
and run

```
cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-loongarch64-musl
```

With this downgrade it should compile.
2025-08-17 16:05:32 +00:00
Weihang Lo
eae8d0dd30
Reorder lto options in profiles.md (#15841)
Aside from `false`, the `lto` options seem to be ordered from "most
optimizing" to "least optimizing".

If this interpretation is correct, then I think `false` should go
between `thin` and `off`.

cc: @ehuss (who I think wrote that text)
2025-08-17 15:36:33 +00:00
Weihang Lo
72dabb4487
chore: downgrade to libc@0.2.174
There is incompatibility between rustix@1.0.8 and libc@0.2.175 that
leads to compilation errors.

See

* https://github.com/bytecodealliance/rustix/issues/1496
* https://github.com/rust-lang/rust/pull/145478#issuecomment-3193494156
2025-08-17 10:37:29 -04:00
Samuel Moelius
396f8c62ed
Mention ordering rationale in profiles.md
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2025-08-17 10:29:42 -04:00
Ross Sullivan
c519405582
docs(unstable): Added -Zbuild-dir-new-layout to unstable doc 2025-08-17 14:19:58 +09:00
Ross Sullivan
8e53ef3bbf
feat(unstable): Added -Zbuild-dir-new-layout unstable feature 2025-08-17 14:17:27 +09:00
Ed Page
e04e0b65c0
feat(unstable): add -Zbuild-analysis unstable feature (#15845)
### What does this PR try to resolve?

Part of #15844

Set up `-Zbuild-analysis` flag and `build.analysis` configuration table
to lay the ground work.
when `build.analysis.enabled = true`, enables HTML timing output to
pretend we are persisting timing data for now. This will change when the
storage part is implemented.

### How to test and review this PR?
2025-08-16 14:18:21 +00:00
Weihang Lo
4373786e3f
docs(unstable): add -Zbuild-analysis doc 2025-08-16 08:28:38 -04:00
Weihang Lo
b43404de7e
feat(build-analysis): build.analysis configuration
When enabled, set timing output format to HTML to pretend
we are persisting timing data for now.
2025-08-16 08:28:38 -04:00
Weihang Lo
973f7410a8
test(build-analysis): feature gate tests 2025-08-16 08:28:37 -04:00
Ed Page
a22a25b602
refactor(unstable): group stabilized features (#15846)
This was an overlook when stabilizing doctest-xcompile
2025-08-16 11:02:12 +00:00
Weihang Lo
121b80dc98
refactor(unstable): group stabilized features 2025-08-16 00:14:17 -04:00
Weihang Lo
57fd10126c
feat(unstable): add -Zbuild-analysis unstable feature 2025-08-15 23:32:31 -04:00
Ed Page
9a0712751c
Fixes error while running the cargo clippy --all-targets -- -D warning (#15843)
Fixes #15842

Before -:

<img width="895" height="701" alt="Screenshot From 2025-08-16 01-15-35"
src="https://github.com/user-attachments/assets/5e8daca4-5fad-4fc7-bb12-f67288061704"
/>

After the fix-:

<img width="831" height="107" alt="Screenshot From 2025-08-16 01-28-50"
src="https://github.com/user-attachments/assets/eb03c852-69a0-44a3-9562-f8a99dae4033"
/>
2025-08-15 20:30:47 +00:00
Weihang Lo
d1bbe63f64
Clarify that cargo doc --no-deps is cumulative and won’t delete prev (#15800)
### What does this PR try to resolve?
clarifies that cargo doc --no-deps will not delete previously-built
dependency docs, and points users to cargo clean --doc or manual
deletion if they want a truly “fresh” doc set. This pr fixed
https://github.com/rust-lang/cargo/issues/15728

### How to test and review this PR?
No testing required.
2025-08-15 20:01:27 +00:00
Ojus Chugh
0e540b2bea Fixes error while running the cargo clippy --all-targets -- -D warnings commad 2025-08-16 01:18:59 +05:30
Ojus Chugh
ff9a9c8305 fixed documentation, which fixes the concern raised in issue 15728 and regenerated pages using cargo build-man and ran ./ci/validate-man.sh 2025-08-16 00:56:15 +05:30
Samuel Moelius
0b34dd3577
Reorder lto options in profiles.md 2025-08-15 13:08:25 -04:00
Weihang Lo
c204194c52
docs: Formatting and cross-linking to build-dir/target-dir docs (#15840)
Documentation follow up on
https://github.com/rust-lang/cargo/pull/15833#discussion_r2278150419

r? @weihanglo
2025-08-15 12:18:04 +00:00
Ross Sullivan
e1969ef25a
docs: Formatting and cross-linking to build-dir/target-dir docs 2025-08-15 20:26:55 +09:00
Ed Page
2b71fd6424
Stabilize build.build-dir (#15833)
This PR stabilizes `build.build-dir` which moves intermediate build
artifacts out of `target-dir`.

* Tracking issue: #14125
* Call for testing:
https://github.com/rust-lang/cargo/issues/14125#issuecomment-3029073591
* FCP:
https://github.com/rust-lang/cargo/issues/14125#issuecomment-3029073904
* Implementation: https://github.com/rust-lang/cargo/pull/15104

Closes #14125
2025-08-15 02:30:18 +00:00
Ross Sullivan
a24ae6fd58
feat(build-dir): Stabilize build-dir 2025-08-15 11:00:01 +09:00
Ed Page
a2f54c794b
make resolve features public for cargo-as-a-library (#15835)
### What does this PR try to resolve?

While working on a [plumbing
command](https://github.com/crate-ci/cargo-plumbing) for feature
resolution, I hit a dead end where the fields and types are private.
This PR changes the needed things into `pub`.

r? @epage

### How to test and review this PR?

`cargo check`
2025-08-13 18:33:27 +00:00
secona
9e48c5af5f refactor: make resolve features public 2025-08-14 00:51:05 +07:00
Ed Page
02bcdd2983
chore(deps): bump slab from 0.4.10 to 0.4.11 (#15832)
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/slab/releases">slab's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.11</h2>
<ul>
<li>Fix <code>Slab::get_disjoint_mut</code> out of bounds (<a
href="https://redirect.github.com/tokio-rs/slab/issues/152">#152</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md">slab's
changelog</a>.</em></p>
<blockquote>
<h1>0.4.11 (August 8, 2025)</h1>
<ul>
<li>Fix <code>Slab::get_disjoint_mut</code> out of bounds (<a
href="https://redirect.github.com/tokio-rs/slab/issues/152">#152</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2e5779f8eb"><code>2e5779f</code></a>
Release v0.4.11 (<a
href="https://redirect.github.com/tokio-rs/slab/issues/153">#153</a>)</li>
<li><a
href="2d65c514bc"><code>2d65c51</code></a>
Fix get_disjoint_mut error condition (<a
href="https://redirect.github.com/tokio-rs/slab/issues/152">#152</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=slab&package-manager=cargo&previous-version=0.4.10&new-version=0.4.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/rust-lang/cargo/network/alerts).

</details>
2025-08-13 13:47:53 +00:00
dependabot[bot]
4eca2106bf
chore(deps): bump slab from 0.4.10 to 0.4.11
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11.
- [Release notes](https://github.com/tokio-rs/slab/releases)
- [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11)

---
updated-dependencies:
- dependency-name: slab
  dependency-version: 0.4.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-13 00:18:01 +00:00
Eric Huss
e647065d5d
chore: remove x86_64-apple-darwin from CI and tests (#15831)
### What does this PR try to resolve?

RFC 3841 has merged, and x86_64-apple-darwin will be demoted to tier-2
in 1.90.0. In Cargo we usually run test against tier-1 platforms, so
x86_64-apple-darwin should be removed.
Also, that target platform is often the slowest one in CI, we are happy
to remove it to save us a couple of minutes.

https://rust-lang.github.io/rfcs/3841-demote-x86_64-apple-darwin.html

### How to test and review this PR?

Run `cargo test` locally with cross-compile tests enabled, and no
regression.
2025-08-12 20:48:04 +00:00