Skip to content

Remove windows-sys from the library workspace#155681

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
bjorn3:update_dlmalloc
May 5, 2026
Merged

Remove windows-sys from the library workspace#155681
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
bjorn3:update_dlmalloc

Conversation

@bjorn3

@bjorn3 bjorn3 commented Apr 23, 2026

Copy link
Copy Markdown
Member

Windows-sys isn't actually used as dlmalloc doesn't use it on any of the targets where std uses dlmalloc, but still ends up in the lockfile and thus gets vendored. By using a patch to replace it with an empty crate the vendor size of the standard library is reduced from 93MB to 20MB.

Windows-sys isn't actually used as dlmalloc doesn't use it on any of the
targets where std uses dlmalloc, but still ends up in the lockfile and
thus gets vendored. This reduces the vendor size of the standard library
from 93MB to 37MB.
@rustbot

rustbot commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the library/Cargo.lock file. Unintentional changes to library/Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

@rustbot rustbot added A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 23, 2026
@rustbot

rustbot commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@bjorn3

bjorn3 commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

It would be nice if we could get rid of the false dependency on windows-sys in the lockfile. That would save an additional 19MB.

@ChrisDenton

Copy link
Copy Markdown
Member

It would be nice if we could get rid of the false dependency on windows-sys in the lockfile. That would save an additional 19MB.

I think adding any dependency to the lockfile that could be used is an intentional choice, no?

Would it be possible to [patch] windows-sys with a dummy crate? Though that feels like a bit of a hack.

@bjorn3

bjorn3 commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

There is no target for which it would actually be used. Dlmalloc only uses it on windows, but dlmalloc itself isn't used on windows. I can try a patch.

This reduces the vendor size of the standard library from 37MB to 20MB.
@bjorn3

bjorn3 commented Apr 23, 2026

Copy link
Copy Markdown
Member Author

Patching a dummy crate in seems to work. That further reduces the vendor size to 20MB.

@bjorn3 bjorn3 changed the title Update dlmalloc and windows-sys for the library workspace Remove windows-sys from the library workspace Apr 23, 2026
@clubby789

Copy link
Copy Markdown
Contributor

LGTM
@bors r+

@rust-bors

rust-bors Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b7f337e has been approved by clubby789

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 4, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 5, 2026
@rust-bors

rust-bors Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: clubby789
Duration: 3h 7m 39s
Pushing 83adf7e to main...

@rust-bors rust-bors Bot merged commit 83adf7e into rust-lang:main May 5, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 5, 2026
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing cb40c25 (parent) -> 83adf7e (this PR)

Test differences

Show 29 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/amdgpu-addrspacecast.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/array-equality.rs#llvm-next: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J0)
  • [codegen] tests/codegen-llvm/gpu-launch-sized-workgroup-memory.rs#nvptx-post-llvm-23: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J0)
  • [codegen] tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs#old: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/issues/issue-37945.rs#new: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J0)
  • [codegen] tests/codegen-llvm/issues/matches-logical-or-141497.rs: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J0)
  • [codegen] tests/codegen-llvm/scalable-vectors/debuginfo.rs#PRE-LLVM-22: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/vec_pop_push_noop.rs#old: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)
  • [codegen] tests/codegen-llvm/vecdeque_pop_push.rs#old: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J0)

Stage 2

  • [codegen] tests/codegen-llvm/amdgpu-addrspacecast.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/array-equality.rs#llvm-next: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J1)
  • [codegen] tests/codegen-llvm/gpu-launch-sized-workgroup-memory.rs#nvptx-post-llvm-23: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J1)
  • [codegen] tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs#old: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/issues/issue-37945.rs#new: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J1)
  • [codegen] tests/codegen-llvm/issues/matches-logical-or-141497.rs: ignore (ignored when the LLVM version 22.1.1 is older than 23.0.0) -> ignore (ignored when the LLVM version 22.1.2 is older than 23.0.0) (J1)
  • [codegen] tests/codegen-llvm/scalable-vectors/debuginfo.rs#PRE-LLVM-22: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-gather.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-load.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-masked-store.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/simd-intrinsic/simd-intrinsic-generic-scatter.rs#LLVM21: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/vec_pop_push_noop.rs#old: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)
  • [codegen] tests/codegen-llvm/vecdeque_pop_push.rs#old: ignore (ignored when the LLVM version (22.1.1) is newer than majorversion 21) -> ignore (ignored when the LLVM version (22.1.2) is newer than majorversion 21) (J1)

Additionally, 3 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 83adf7e080d0fe4f0970c00eac2976a767dbd042 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 1h 18m -> 1h 41m (+28.9%)
  2. dist-x86_64-msvc-alt: 2h 54m -> 2h 8m (-26.1%)
  3. x86_64-gnu-stable: 2h 4m -> 2h 32m (+22.3%)
  4. x86_64-gnu-llvm-21-3: 1h 57m -> 1h 33m (-20.6%)
  5. pr-check-1: 28m 14s -> 33m 57s (+20.3%)
  6. dist-i686-mingw: 2h 33m -> 2h 5m (-18.1%)
  7. x86_64-gnu-gcc: 1h 1m -> 1h 11m (+17.4%)
  8. i686-gnu-2: 1h 26m -> 1h 39m (+14.9%)
  9. i686-gnu-1: 1h 58m -> 2h 16m (+14.6%)
  10. x86_64-gnu-tools: 54m 15s -> 1h 1m (+14.0%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (83adf7e): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 4
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 5.4%, secondary -0.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
5.4% [5.4%, 5.4%] 1
Regressions ❌
(secondary)
0.9% [0.4%, 2.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.5%, -2.4%] 2
All ❌✅ (primary) 5.4% [5.4%, 5.4%] 1

Cycles

Results (primary -3.3%, secondary -1.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.9% [0.8%, 2.8%] 4
Improvements ✅
(primary)
-3.3% [-3.8%, -2.7%] 2
Improvements ✅
(secondary)
-2.6% [-7.0%, -0.4%] 16
All ❌✅ (primary) -3.3% [-3.8%, -2.7%] 2

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 497.794s -> 495.736s (-0.41%)
Artifact size: 396.40 MiB -> 394.42 MiB (-0.50%)

@bjorn3 bjorn3 deleted the update_dlmalloc branch May 5, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants