File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ dependencies = [
347347 " wasip1" ,
348348 " wasip2" ,
349349 " wasip3" ,
350- " windows-link 0.0.0 " ,
350+ " windows-link" ,
351351]
352352
353353[[package ]]
@@ -443,20 +443,9 @@ dependencies = [
443443name = " windows-link"
444444version = " 0.0.0"
445445
446- [[package ]]
447- name = " windows-link"
448- version = " 0.2.1"
449- source = " registry+https://github.com/rust-lang/crates.io-index"
450- checksum = " f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
451-
452446[[package ]]
453447name = " windows-sys"
454- version = " 0.61.2"
455- source = " registry+https://github.com/rust-lang/crates.io-index"
456- checksum = " ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
457- dependencies = [
458- " windows-link 0.2.1" ,
459- ]
448+ version = " 0.61.100"
460449
461450[[package ]]
462451name = " wit-bindgen"
Original file line number Diff line number Diff line change @@ -85,3 +85,6 @@ rustflags = [
8585rustc-std-workspace-core = { path = ' rustc-std-workspace-core' }
8686rustc-std-workspace-alloc = { path = ' rustc-std-workspace-alloc' }
8787rustc-std-workspace-std = { path = ' rustc-std-workspace-std' }
88+
89+ # See comments in `library/windows-sys/Cargo.toml` for why this is patched
90+ windows-sys = { path = ' windows-sys' }
Original file line number Diff line number Diff line change 1+ # dlmalloc has a dependency on windows-sys for when it gets compiled for Windows.
2+ # std however never actually uses dlmalloc on Windows. As dlmalloc is the only
3+ # user of windows-sys in the standard library, the windows-sys crate unnecessarily
4+ # increases the size of the vendored crates. By replacing it with an empty crate
5+ # we save about 19MB.
6+
7+ [package ]
8+ name = " windows-sys"
9+ version = " 0.61.100"
10+ edition = " 2024"
11+
12+ [features ]
13+ Win32_Foundation = []
14+ Win32_System_Memory = []
15+ Win32_System_Threading = []
16+ Win32_System_SystemInformation = []
Original file line number Diff line number Diff line change 1+ compile_error ! ( "This crate should never be compiled" ) ;
Original file line number Diff line number Diff line change @@ -543,7 +543,7 @@ const PERMITTED_STDLIB_DEPENDENCIES: &[&str] = &[
543543 "wasip2" ,
544544 "wasip3" ,
545545 "windows-link" ,
546- "windows-sys" ,
546+ "windows-sys@0.61.100" , // Enforce the usage of our dummy windows-sys patch. Keep version in sync.
547547 "wit-bindgen" ,
548548 // tidy-alphabetical-end
549549] ;
You can’t perform that action at this time.
0 commit comments