Skip to content

Commit 560b580

Browse files
committed
overzealously mark sysroot deps private
1 parent 4693040 commit 560b580

File tree

7 files changed

+52
-40
lines changed

7 files changed

+52
-40
lines changed

library/alloc/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "alloc"
35
version = "0.0.0"
@@ -9,8 +11,8 @@ autobenches = false
911
edition = "2021"
1012

1113
[dependencies]
12-
core = { path = "../core" }
13-
compiler_builtins = { version = "=0.1.140", features = ['rustc-dep-of-std'] }
14+
core = { path = "../core", public = true }
15+
compiler_builtins = { version = "=0.1.140", features = ['rustc-dep-of-std'], public = false }
1416

1517
[dev-dependencies]
1618
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

library/panic_abort/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "panic_abort"
35
version = "0.0.0"
@@ -12,10 +14,10 @@ bench = false
1214
doc = false
1315

1416
[dependencies]
15-
alloc = { path = "../alloc" }
16-
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
17-
core = { path = "../core" }
18-
compiler_builtins = "0.1.0"
17+
alloc = { path = "../alloc", public = true }
18+
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'], public = false }
19+
core = { path = "../core", public = false }
20+
compiler_builtins = { version = "0.1.0", public = false }
1921

2022
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
21-
libc = { version = "0.2", default-features = false }
23+
libc = { version = "0.2", default-features = false, public = false }

library/panic_unwind/Cargo.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "panic_unwind"
35
version = "0.0.0"
@@ -12,14 +14,14 @@ bench = false
1214
doc = false
1315

1416
[dependencies]
15-
alloc = { path = "../alloc" }
16-
core = { path = "../core" }
17-
unwind = { path = "../unwind" }
18-
compiler_builtins = "0.1.0"
19-
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
17+
alloc = { path = "../alloc", public = true }
18+
core = { path = "../core", public = true }
19+
unwind = { path = "../unwind", public = false }
20+
compiler_builtins = { version = "0.1.0", public = false }
21+
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'], public = false }
2022

2123
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
22-
libc = { version = "0.2", default-features = false }
24+
libc = { version = "0.2", default-features = false, public = false }
2325

2426
[lints.rust.unexpected_cfgs]
2527
level = "warn"

library/std/Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ crate-type = ["dylib", "rlib"]
1313

1414
[dependencies]
1515
alloc = { path = "../alloc", public = true }
16-
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
17-
panic_unwind = { path = "../panic_unwind", optional = true }
18-
panic_abort = { path = "../panic_abort" }
16+
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'], public = false }
17+
panic_unwind = { path = "../panic_unwind", optional = true, public = false }
18+
panic_abort = { path = "../panic_abort", public = false }
1919
core = { path = "../core", public = true }
20-
compiler_builtins = { version = "=0.1.140" }
20+
compiler_builtins = { version = "=0.1.140", public = false }
2121
unwind = { path = "../unwind" }
2222
hashbrown = { version = "0.15", default-features = false, features = [
2323
'rustc-dep-of-std',
24-
] }
24+
], public = false }
2525
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = [
2626
'rustc-dep-of-std',
27-
] }
27+
], public = false }
2828

2929
# Dependencies of the `backtrace` crate
30-
rustc-demangle = { version = "0.1.24", features = ['rustc-dep-of-std'] }
30+
rustc-demangle = { version = "0.1.24", features = ['rustc-dep-of-std'], public = false }
3131

3232
[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
33-
miniz_oxide = { version = "0.8.0", optional = true, default-features = false }
34-
addr2line = { version = "0.24.0", optional = true, default-features = false }
33+
miniz_oxide = { version = "0.8.0", optional = true, default-features = false, public = false }
34+
addr2line = { version = "0.24.0", optional = true, default-features = false, public = false }
3535

3636
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
3737
libc = { version = "0.2.169", default-features = false, features = [
@@ -46,15 +46,15 @@ object = { version = "0.36.0", default-features = false, optional = true, featur
4646
'pe',
4747
'unaligned',
4848
'archive',
49-
] }
49+
], public = false }
5050

5151
[target.'cfg(target_os = "aix")'.dependencies]
5252
object = { version = "0.36.0", default-features = false, optional = true, features = [
5353
'read_core',
5454
'xcoff',
5555
'unaligned',
5656
'archive',
57-
] }
57+
], public = false }
5858

5959
[target.'cfg(windows)'.dependencies.windows-targets]
6060
path = "../windows_targets"
@@ -64,7 +64,7 @@ rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
6464
rand_xorshift = "0.3.0"
6565

6666
[target.'cfg(any(all(target_family = "wasm", target_os = "unknown"), target_os = "xous", all(target_vendor = "fortanix", target_env = "sgx")))'.dependencies]
67-
dlmalloc = { version = "0.2.4", features = ['rustc-dep-of-std'] }
67+
dlmalloc = { version = "0.2.4", features = ['rustc-dep-of-std'], public = false }
6868

6969
[target.x86_64-fortanix-unknown-sgx.dependencies]
7070
fortanix-sgx-abi = { version = "0.5.0", features = [
@@ -82,8 +82,8 @@ wasi = { version = "0.11.0", features = [
8282
], default-features = false }
8383

8484
[target.'cfg(target_os = "uefi")'.dependencies]
85-
r-efi = { version = "4.5.0", features = ['rustc-dep-of-std'] }
86-
r-efi-alloc = { version = "1.0.0", features = ['rustc-dep-of-std'] }
85+
r-efi = { version = "4.5.0", features = ['rustc-dep-of-std'], public = false }
86+
r-efi-alloc = { version = "1.0.0", features = ['rustc-dep-of-std'], public = false }
8787

8888
[features]
8989
backtrace = [

library/sysroot/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "sysroot"
35
version = "0.0.0"
46
edition = "2021"
57

68
# this is a dummy crate to ensure that all required crates appear in the sysroot
79
[dependencies]
8-
proc_macro = { path = "../proc_macro" }
9-
profiler_builtins = { path = "../profiler_builtins", optional = true }
10-
std = { path = "../std" }
11-
test = { path = "../test" }
10+
proc_macro = { path = "../proc_macro", public = true }
11+
profiler_builtins = { path = "../profiler_builtins", optional = true, public = false }
12+
std = { path = "../std", public = true }
13+
test = { path = "../test", public = false }
1214

1315
# Forward features to the `std` crate as necessary
1416
[features]

library/test/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "test"
35
version = "0.0.0"
46
edition = "2021"
57

68
[dependencies]
7-
getopts = { version = "0.2.21", features = ['rustc-dep-of-std'] }
8-
std = { path = "../std" }
9-
core = { path = "../core" }
9+
getopts = { version = "0.2.21", features = ['rustc-dep-of-std'], public = false }
10+
std = { path = "../std", public = true }
11+
core = { path = "../core", public = true }
1012

1113
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
12-
libc = { version = "0.2.150", default-features = false }
14+
libc = { version = "0.2.150", default-features = false, public = false }

library/unwind/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cargo-features = ["public-dependency"]
2+
13
[package]
24
name = "unwind"
35
version = "0.0.0"
@@ -14,15 +16,15 @@ bench = false
1416
doc = false
1517

1618
[dependencies]
17-
core = { path = "../core" }
18-
compiler_builtins = "0.1.0"
19-
cfg-if = "1.0"
19+
core = { path = "../core", public = true }
20+
compiler_builtins = { version = "0.1.0", public = false }
21+
cfg-if = { version = "1.0", public = false }
2022

2123
[target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies]
22-
libc = { version = "0.2.140", features = ['rustc-dep-of-std'], default-features = false }
24+
libc = { version = "0.2.140", features = ['rustc-dep-of-std'], default-features = false, public = false }
2325

2426
[target.'cfg(target_os = "xous")'.dependencies]
25-
unwinding = { version = "0.2.5", features = ['rustc-dep-of-std', 'unwinder', 'fde-custom'], default-features = false }
27+
unwinding = { version = "0.2.5", features = ['rustc-dep-of-std', 'unwinder', 'fde-custom'], default-features = false, public = false }
2628

2729
[features]
2830

0 commit comments

Comments
 (0)