diff --git a/Cargo.toml b/Cargo.toml index d8cece9e..a2d77e20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,20 +18,16 @@ cfg-if = "1" compiler_builtins = { version = "0.1", optional = true } core = { version = "1.0", optional = true, package = "rustc-std-workspace-core" } -# apple-other -[target.'cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos"))'.dependencies] -libc = { version = "0.2.154", default-features = false } - -# vxworks -[target.'cfg(target_os = "vxworks")'.dependencies] +# linux_android / linux_android_with_fallback +[target.'cfg(all(any(target_os = "linux", target_os = "android"), not(any(getrandom_backend = "linux_rustix", getrandom_backend = "custom"))))'.dependencies] libc = { version = "0.2.154", default-features = false } -# use_file -[target.'cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix"))'.dependencies] -libc = { version = "0.2.154", default-features = false } +# linux_rustix +[target.'cfg(all(any(target_os = "linux", target_os = "android"), any(target_env = "", getrandom_backend = "linux_rustix")))'.dependencies] +rustix = { version = "0.38", default-features = false, features = ["rand"] } -# solaris -[target.'cfg(target_os = "solaris")'.dependencies] +# apple-other +[target.'cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos"))'.dependencies] libc = { version = "0.2.154", default-features = false } # getentropy @@ -42,13 +38,21 @@ libc = { version = "0.2.154", default-features = false } [target.'cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", all(target_os = "horizon", target_arch = "arm")))'.dependencies] libc = { version = "0.2.154", default-features = false } -# linux_android / linux_android_with_fallback -[target.'cfg(all(any(target_os = "linux", target_os = "android"), not(any(getrandom_backend = "linux_rustix", getrandom_backend = "custom"))))'.dependencies] +# netbsd +[target.'cfg(target_os = "netbsd")'.dependencies] libc = { version = "0.2.154", default-features = false } -# linux_rustix -[target.'cfg(all(any(target_os = "linux", target_os = "android"), any(target_env = "", getrandom_backend = "linux_rustix")))'.dependencies] -rustix = { version = "0.38", default-features = false, features = ["rand"] } +# solaris +[target.'cfg(target_os = "solaris")'.dependencies] +libc = { version = "0.2.154", default-features = false } + +# use_file +[target.'cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix"))'.dependencies] +libc = { version = "0.2.154", default-features = false } + +# vxworks +[target.'cfg(target_os = "vxworks")'.dependencies] +libc = { version = "0.2.154", default-features = false } # wasi (0.2 only) [target.'cfg(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2"))'.dependencies]