| 1 | cargo-features = ["public-dependency" ] |
| 2 | |
| 3 | [package] |
| 4 | name = "std" |
| 5 | version = "0.0.0" |
| 6 | license = "MIT OR Apache-2.0" |
| 7 | repository = "https://github.com/rust-lang/rust.git" |
| 8 | description = "The Rust Standard Library" |
| 9 | edition = "2024" |
| 10 | autobenches = false |
| 11 | |
| 12 | [lib] |
| 13 | crate-type = ["dylib" , "rlib" ] |
| 14 | |
| 15 | [dependencies] |
| 16 | alloc = { path = "../alloc" , public = true } |
| 17 | cfg-if = { version = "1.0" , features = ['rustc-dep-of-std' ] } |
| 18 | panic_unwind = { path = "../panic_unwind" , optional = true } |
| 19 | panic_abort = { path = "../panic_abort" } |
| 20 | core = { path = "../core" , public = true } |
| 21 | compiler_builtins = { path = "../compiler-builtins/compiler-builtins" } |
| 22 | unwind = { path = "../unwind" } |
| 23 | hashbrown = { version = "0.15" , default-features = false, features = [ |
| 24 | 'rustc-dep-of-std' , |
| 25 | ] } |
| 26 | std_detect = { path = "../stdarch/crates/std_detect" , default-features = false, features = [ |
| 27 | 'rustc-dep-of-std' , |
| 28 | ] } |
| 29 | |
| 30 | # Dependencies of the `backtrace` crate |
| 31 | rustc-demangle = { version = "0.1.24" , features = ['rustc-dep-of-std' ] } |
| 32 | |
| 33 | [target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies] |
| 34 | miniz_oxide = { version = "0.8.0" , optional = true, default-features = false } |
| 35 | addr2line = { version = "0.24.0" , optional = true, default-features = false } |
| 36 | |
| 37 | [target.'cfg(not(all(windows, target_env = "msvc")))'.dependencies] |
| 38 | libc = { version = "0.2.172" , default-features = false, features = [ |
| 39 | 'rustc-dep-of-std' , |
| 40 | ], public = true } |
| 41 | |
| 42 | [target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies] |
| 43 | object = { version = "0.36.0" , default-features = false, optional = true, features = [ |
| 44 | 'read_core' , |
| 45 | 'elf' , |
| 46 | 'macho' , |
| 47 | 'pe' , |
| 48 | 'unaligned' , |
| 49 | 'archive' , |
| 50 | ] } |
| 51 | |
| 52 | [target.'cfg(target_os = "aix")'.dependencies] |
| 53 | object = { version = "0.36.0" , default-features = false, optional = true, features = [ |
| 54 | 'read_core' , |
| 55 | 'xcoff' , |
| 56 | 'unaligned' , |
| 57 | 'archive' , |
| 58 | ] } |
| 59 | |
| 60 | [target.'cfg(any(windows, target_os = "cygwin"))'.dependencies.windows-targets] |
| 61 | path = "../windows_targets" |
| 62 | |
| 63 | [dev-dependencies] |
| 64 | rand = { version = "0.9.0" , default-features = false, features = ["alloc" ] } |
| 65 | rand_xorshift = "0.4.0" |
| 66 | |
| 67 | [target.'cfg(any(all(target_family = "wasm", target_os = "unknown"), target_os = "xous", all(target_vendor = "fortanix", target_env = "sgx")))'.dependencies] |
| 68 | dlmalloc = { version = "0.2.4" , features = ['rustc-dep-of-std' ] } |
| 69 | |
| 70 | [target.x86_64-fortanix-unknown-sgx.dependencies] |
| 71 | fortanix-sgx-abi = { version = "0.5.0" , features = [ |
| 72 | 'rustc-dep-of-std' , |
| 73 | ], public = true } |
| 74 | |
| 75 | [target.'cfg(target_os = "hermit")'.dependencies] |
| 76 | hermit-abi = { version = "0.5.0" , features = [ |
| 77 | 'rustc-dep-of-std' , |
| 78 | ], public = true } |
| 79 | |
| 80 | [target.'cfg(target_os = "wasi")'.dependencies] |
| 81 | wasi = { version = "0.11.0" , features = [ |
| 82 | 'rustc-dep-of-std' , |
| 83 | ], default-features = false } |
| 84 | |
| 85 | [target.'cfg(target_os = "uefi")'.dependencies] |
| 86 | r-efi = { version = "5.2.0" , features = ['rustc-dep-of-std' ] } |
| 87 | r-efi-alloc = { version = "2.0.0" , features = ['rustc-dep-of-std' ] } |
| 88 | |
| 89 | [features] |
| 90 | backtrace = [ |
| 91 | 'addr2line/rustc-dep-of-std' , |
| 92 | 'object/rustc-dep-of-std' , |
| 93 | 'miniz_oxide/rustc-dep-of-std' , |
| 94 | ] |
| 95 | |
| 96 | panic-unwind = ["panic_unwind" ] |
| 97 | compiler-builtins-c = ["alloc/compiler-builtins-c" ] |
| 98 | compiler-builtins-mem = ["alloc/compiler-builtins-mem" ] |
| 99 | compiler-builtins-no-asm = ["alloc/compiler-builtins-no-asm" ] |
| 100 | compiler-builtins-no-f16-f128 = ["alloc/compiler-builtins-no-f16-f128" ] |
| 101 | compiler-builtins-mangled-names = ["alloc/compiler-builtins-mangled-names" ] |
| 102 | llvm-libunwind = ["unwind/llvm-libunwind" ] |
| 103 | system-llvm-libunwind = ["unwind/system-llvm-libunwind" ] |
| 104 | |
| 105 | # Make panics and failed asserts immediately abort without formatting any message |
| 106 | panic_immediate_abort = [ |
| 107 | "core/panic_immediate_abort" , |
| 108 | "alloc/panic_immediate_abort" , |
| 109 | ] |
| 110 | # Choose algorithms that are optimized for binary size instead of runtime performance |
| 111 | optimize_for_size = ["core/optimize_for_size" , "alloc/optimize_for_size" ] |
| 112 | |
| 113 | # Make `RefCell` store additional debugging information, which is printed out when |
| 114 | # a borrow error occurs |
| 115 | debug_refcell = ["core/debug_refcell" ] |
| 116 | # Make `TypeId` store a reference to the name of the type, so that it can print that name. |
| 117 | debug_typeid = ["core/debug_typeid" ] |
| 118 | |
| 119 | |
| 120 | # Enable std_detect default features for stdarch/crates/std_detect: |
| 121 | # https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml |
| 122 | std_detect_file_io = ["std_detect/std_detect_file_io" ] |
| 123 | std_detect_dlsym_getauxval = ["std_detect/std_detect_dlsym_getauxval" ] |
| 124 | |
| 125 | # Enable using raw-dylib for Windows imports. |
| 126 | # This will eventually be the default. |
| 127 | windows_raw_dylib = ["windows-targets/windows_raw_dylib" ] |
| 128 | |
| 129 | [package.metadata.fortanix-sgx] |
| 130 | # Maximum possible number of threads when testing |
| 131 | threads = 125 |
| 132 | # Maximum heap size |
| 133 | heap_size = 0x8000000 |
| 134 | |
| 135 | [[test]] |
| 136 | name = "pipe-subprocess" |
| 137 | path = "tests/pipe_subprocess.rs" |
| 138 | harness = false |
| 139 | |
| 140 | [[test]] |
| 141 | name = "sync" |
| 142 | path = "tests/sync/lib.rs" |
| 143 | |
| 144 | [[test]] |
| 145 | name = "floats" |
| 146 | path = "tests/floats/lib.rs" |
| 147 | |
| 148 | [[test]] |
| 149 | name = "thread_local" |
| 150 | path = "tests/thread_local/lib.rs" |
| 151 | |
| 152 | [[bench]] |
| 153 | name = "stdbenches" |
| 154 | path = "benches/lib.rs" |
| 155 | test = true |
| 156 | |
| 157 | [lints.rust.unexpected_cfgs] |
| 158 | level = "warn" |
| 159 | check-cfg = [ |
| 160 | # #[cfg(bootstrap)] loongarch32 |
| 161 | 'cfg(target_arch, values("loongarch32"))' , |
| 162 | # std use #[path] imports to portable-simd `std_float` crate |
| 163 | # and to the `backtrace` crate which messes-up with Cargo list |
| 164 | # of declared features, we therefor expect any feature cfg |
| 165 | 'cfg(feature, values(any()))' , |
| 166 | # Internal features aren't marked known config by default, we use these to |
| 167 | # gate tests. |
| 168 | 'cfg(target_has_reliable_f16)' , |
| 169 | 'cfg(target_has_reliable_f16_math)' , |
| 170 | 'cfg(target_has_reliable_f128)' , |
| 171 | 'cfg(target_has_reliable_f128_math)' , |
| 172 | ] |
| 173 | |