1cargo-features = ["public-dependency"]
2
3[package]
4name = "std"
5version = "0.0.0"
6license = "MIT OR Apache-2.0"
7repository = "https://github.com/rust-lang/rust.git"
8description = "The Rust Standard Library"
9edition = "2021"
10
11[lib]
12crate-type = ["dylib", "rlib"]
13
14[dependencies]
15alloc = { path = "../alloc", public = true }
16cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
17panic_unwind = { path = "../panic_unwind", optional = true }
18panic_abort = { path = "../panic_abort" }
19core = { path = "../core", public = true }
20libc = { version = "0.2.150", default-features = false, features = ['rustc-dep-of-std'], public = true }
21compiler_builtins = { version = "0.1.105" }
22profiler_builtins = { path = "../profiler_builtins", optional = true }
23unwind = { path = "../unwind" }
24hashbrown = { version = "0.14", default-features = false, features = ['rustc-dep-of-std'] }
25std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }
26
27# Dependencies of the `backtrace` crate
28rustc-demangle = { version = "0.1.21", features = ['rustc-dep-of-std'] }
29
30[target.'cfg(not(all(windows, target_env = "msvc", not(target_vendor = "uwp"))))'.dependencies]
31miniz_oxide = { version = "0.7.0", optional = true, default-features = false }
32addr2line = { version = "0.21.0", optional = true, default-features = false }
33
34[target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies]
35object = { version = "0.32.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] }
36
37[target.'cfg(target_os = "aix")'.dependencies]
38object = { version = "0.32.0", default-features = false, optional = true, features = ['read_core', 'xcoff', 'unaligned', 'archive'] }
39
40[dev-dependencies]
41rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
42rand_xorshift = "0.3.0"
43
44[target.'cfg(any(all(target_family = "wasm", target_os = "unknown"), target_os = "xous", all(target_vendor = "fortanix", target_env = "sgx")))'.dependencies]
45dlmalloc = { version = "0.2.4", features = ['rustc-dep-of-std'] }
46
47[target.x86_64-fortanix-unknown-sgx.dependencies]
48fortanix-sgx-abi = { version = "0.5.0", features = ['rustc-dep-of-std'], public = true }
49
50[target.'cfg(target_os = "hermit")'.dependencies]
51hermit-abi = { version = "0.3.2", features = ['rustc-dep-of-std'], public = true }
52
53[target.'cfg(target_os = "wasi")'.dependencies]
54wasi = { version = "0.11.0", features = ['rustc-dep-of-std'], default-features = false }
55
56[target.'cfg(target_os = "uefi")'.dependencies]
57r-efi = { version = "4.2.0", features = ['rustc-dep-of-std'] }
58r-efi-alloc = { version = "1.0.0", features = ['rustc-dep-of-std'] }
59
60[features]
61backtrace = [
62 "gimli-symbolize",
63 'addr2line/rustc-dep-of-std',
64 'object/rustc-dep-of-std',
65 'miniz_oxide/rustc-dep-of-std',
66]
67gimli-symbolize = []
68
69panic-unwind = ["panic_unwind"]
70profiler = ["profiler_builtins"]
71compiler-builtins-c = ["alloc/compiler-builtins-c"]
72compiler-builtins-mem = ["alloc/compiler-builtins-mem"]
73compiler-builtins-no-asm = ["alloc/compiler-builtins-no-asm"]
74compiler-builtins-mangled-names = ["alloc/compiler-builtins-mangled-names"]
75compiler-builtins-weak-intrinsics = ["alloc/compiler-builtins-weak-intrinsics"]
76llvm-libunwind = ["unwind/llvm-libunwind"]
77system-llvm-libunwind = ["unwind/system-llvm-libunwind"]
78
79# Make panics and failed asserts immediately abort without formatting any message
80panic_immediate_abort = ["core/panic_immediate_abort", "alloc/panic_immediate_abort"]
81
82# Enable std_detect default features for stdarch/crates/std_detect:
83# https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml
84std_detect_file_io = ["std_detect/std_detect_file_io"]
85std_detect_dlsym_getauxval = ["std_detect/std_detect_dlsym_getauxval"]
86std_detect_env_override = ["std_detect/std_detect_env_override"]
87
88[package.metadata.fortanix-sgx]
89# Maximum possible number of threads when testing
90threads = 125
91# Maximum heap size
92heap_size = 0x8000000
93
94[[bench]]
95name = "stdbenches"
96path = "benches/lib.rs"
97test = true
98