| 1 |
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO |
| 2 |
# |
| 3 |
# When uploading crates to the registry Cargo will automatically |
| 4 |
# "normalize" Cargo.toml files for maximal compatibility |
| 5 |
# with all versions of Cargo and also rewrite `path` dependencies |
| 6 |
# to registry (e.g., crates.io) dependencies. |
| 7 |
# |
| 8 |
# If you are reading this file be aware that the original Cargo.toml |
| 9 |
# will likely look very different (and much more reasonable). |
| 10 |
# See Cargo.toml.orig for the original contents. |
| 11 |
|
| 12 |
[package] |
| 13 |
edition = "2024" |
| 14 |
rust-version = "1.85" |
| 15 |
name = "getrandom" |
| 16 |
version = "0.4.3" |
| 17 |
authors = ["The Rand Project Developers"] |
| 18 |
build = "build.rs" |
| 19 |
exclude = [".*"] |
| 20 |
autolib = false |
| 21 |
autobins = false |
| 22 |
autoexamples = false |
| 23 |
autotests = false |
| 24 |
autobenches = false |
| 25 |
description = "A small cross-platform library for retrieving random data from system source" |
| 26 |
documentation = "https://docs.rs/getrandom" |
| 27 |
readme = "README.md" |
| 28 |
categories = [ |
| 29 |
"os", |
| 30 |
"no-std", |
| 31 |
] |
| 32 |
license = "MIT OR Apache-2.0" |
| 33 |
repository = "https://github.com/rust-random/getrandom" |
| 34 |
|
| 35 |
[package.metadata.docs.rs] |
| 36 |
features = [ |
| 37 |
"std", |
| 38 |
"sys_rng", |
| 39 |
] |
| 40 |
rustdoc-args = [ |
| 41 |
"--cfg", |
| 42 |
'getrandom_backend="extern_impl"', |
| 43 |
] |
| 44 |
|
| 45 |
[package.metadata.cross.target.x86_64-unknown-netbsd] |
| 46 |
pre-build = [ |
| 47 |
"mkdir -p /tmp/netbsd", |
| 48 |
"curl -fO https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.3/amd64/binary/sets/base.tar.xz", |
| 49 |
"tar -C /tmp/netbsd -xJf base.tar.xz", |
| 50 |
"cp /tmp/netbsd/usr/lib/libexecinfo.so /usr/local/x86_64-unknown-netbsd/lib", |
| 51 |
"rm base.tar.xz", |
| 52 |
"rm -rf /tmp/netbsd", |
| 53 |
] |
| 54 |
|
| 55 |
[features] |
| 56 |
std = [] |
| 57 |
sys_rng = ["dep:rand_core"] |
| 58 |
wasm_js = [ |
| 59 |
"dep:wasm-bindgen", |
| 60 |
"dep:js-sys", |
| 61 |
] |
| 62 |
|
| 63 |
[lib] |
| 64 |
name = "getrandom" |
| 65 |
path = "src/lib.rs" |
| 66 |
|
| 67 |
[[test]] |
| 68 |
name = "mod" |
| 69 |
path = "tests/mod.rs" |
| 70 |
|
| 71 |
[[test]] |
| 72 |
name = "sys_rng" |
| 73 |
path = "tests/sys_rng.rs" |
| 74 |
|
| 75 |
[[bench]] |
| 76 |
name = "buffer" |
| 77 |
path = "benches/buffer.rs" |
| 78 |
|
| 79 |
[dependencies.cfg-if] |
| 80 |
version = "1" |
| 81 |
|
| 82 |
[dependencies.rand_core] |
| 83 |
version = "0.10.0" |
| 84 |
optional = true |
| 85 |
|
| 86 |
[target.'cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr"))))'.dependencies.libc] |
| 87 |
version = "0.2.154" |
| 88 |
default-features = false |
| 89 |
|
| 90 |
[target.'cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none")))'.dependencies.wasm-bindgen] |
| 91 |
version = "0.2.98" |
| 92 |
optional = true |
| 93 |
default-features = false |
| 94 |
|
| 95 |
[target.'cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none")))'.dev-dependencies.wasm-bindgen-test] |
| 96 |
version = "0.3" |
| 97 |
|
| 98 |
[target.'cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none"), target_feature = "atomics"))'.dependencies.js-sys] |
| 99 |
version = "0.3.77" |
| 100 |
optional = true |
| 101 |
default-features = false |
| 102 |
|
| 103 |
[target.'cfg(all(target_os = "uefi", getrandom_backend = "efi_rng"))'.dependencies.r-efi] |
| 104 |
version = "6" |
| 105 |
default-features = false |
| 106 |
|
| 107 |
[target.'cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm")))'.dependencies.libc] |
| 108 |
version = "0.2.154" |
| 109 |
default-features = false |
| 110 |
|
| 111 |
[target.'cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix"))'.dependencies.libc] |
| 112 |
version = "0.2.154" |
| 113 |
default-features = false |
| 114 |
|
| 115 |
[target.'cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos"))'.dependencies.libc] |
| 116 |
version = "0.2.154" |
| 117 |
default-features = false |
| 118 |
|
| 119 |
[target.'cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten"))'.dependencies.libc] |
| 120 |
version = "0.2.154" |
| 121 |
default-features = false |
| 122 |
|
| 123 |
[target.'cfg(target_os = "netbsd")'.dependencies.libc] |
| 124 |
version = "0.2.154" |
| 125 |
default-features = false |
| 126 |
|
| 127 |
[target.'cfg(target_os = "solaris")'.dependencies.libc] |
| 128 |
version = "0.2.154" |
| 129 |
default-features = false |
| 130 |
|
| 131 |
[target.'cfg(target_os = "vxworks")'.dependencies.libc] |
| 132 |
version = "0.2.154" |
| 133 |
default-features = false |
| 134 |
|
| 135 |
[lints.clippy] |
| 136 |
cast_lossless = "warn" |
| 137 |
cast_possible_truncation = "warn" |
| 138 |
cast_possible_wrap = "warn" |
| 139 |
cast_precision_loss = "warn" |
| 140 |
cast_ptr_alignment = "warn" |
| 141 |
cast_sign_loss = "warn" |
| 142 |
char_lit_as_u8 = "warn" |
| 143 |
checked_conversions = "warn" |
| 144 |
fn_to_numeric_cast = "warn" |
| 145 |
fn_to_numeric_cast_with_truncation = "warn" |
| 146 |
ptr_as_ptr = "warn" |
| 147 |
unnecessary_cast = "warn" |
| 148 |
useless_conversion = "warn" |
| 149 |
|
| 150 |
[lints.rust] |
| 151 |
missing_docs = "warn" |
| 152 |
unused_lifetimes = "warn" |
| 153 |
|
| 154 |
[lints.rust.unexpected_cfgs] |
| 155 |
level = "warn" |
| 156 |
priority = 0 |
| 157 |
check-cfg = [ |
| 158 |
'cfg(getrandom_backend, values("custom", "efi_rng", "rdrand", "rndr", "linux_getrandom", "linux_raw", "windows_legacy", "unsupported", "extern_impl"))', |
| 159 |
"cfg(getrandom_msan)", |
| 160 |
"cfg(getrandom_test_linux_fallback)", |
| 161 |
"cfg(getrandom_test_linux_without_fallback)", |
| 162 |
"cfg(getrandom_test_netbsd_fallback)", |
| 163 |
'cfg(target_os, values("cygwin"))', |
| 164 |
'cfg(target_os, values("motor"))', |
| 165 |
] |