//! System-specific implementations. //! //! This module should provide `fill_inner` with the signature //! `fn fill_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error>`. //! The function MUST fully initialize `dest` when `Ok(())` is returned. //! The function MUST NOT ever write uninitialized bytes into `dest`, //! regardless of what value it returns.
cfg_if! { if#[cfg(getrandom_backend = "custom")] { mod custom; pubuse custom::*;
} elseif#[cfg(getrandom_backend = "linux_getrandom")] { mod getrandom; pubuse getrandom::*;
} elseif#[cfg(getrandom_backend = "linux_raw")] { mod linux_raw; pubuse linux_raw::*;
} elseif#[cfg(getrandom_backend = "rdrand")] { mod rdrand; pubuse rdrand::*;
} elseif#[cfg(getrandom_backend = "rndr")] { mod rndr; pubuse rndr::*;
} elseif#[cfg(getrandom_backend = "efi_rng")] { mod efi_rng; pubuse efi_rng::*;
} elseif#[cfg(all(getrandom_backend = "wasm_js"))] {
cfg_if! { if#[cfg(feature = "wasm_js")] { mod wasm_js; pubuse wasm_js::*;
} else {
compile_error!(concat!( "The \"wasm_js\" backend requires the `wasm_js` feature \ for `getrandom`. For more information see: \
https://docs.rs/getrandom/", env!("CARGO_PKG_VERSION"), "/#webassembly-support"
));
}
}
} elseif#[cfg(all(target_os = "linux", target_env = ""))] { mod linux_raw; pubuse linux_raw::*;
} elseif#[cfg(target_os = "espidf")] { mod esp_idf; pubuse esp_idf::*;
} elseif#[cfg(any(
target_os = "haiku",
target_os = "redox",
target_os = "nto",
target_os = "aix",
))] { mod use_file; pubuse use_file::*;
} elseif#[cfg(any(
target_os = "macos",
target_os = "openbsd",
target_os = "vita",
target_os = "emscripten",
))] { mod getentropy; pubuse getentropy::*;
} elseif#[cfg(any( // Rust supports Android API level 19 (KitKat) [0] and the next upgrade targets // level 21 (Lollipop) [1], while `getrandom(2)` was added only in // level 23 (Marshmallow). Note that it applies only to the "old" `target_arch`es, // RISC-V Android targets sufficiently new API level, same will apply for potential // new Android `target_arch`es. // [0]: https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html // [1]: https://github.com/rust-lang/rust/pull/120593
all(
target_os = "android",
any(
target_arch = "aarch64",
target_arch = "arm",
target_arch = "x86",
target_arch = "x86_64",
),
), // Only on these `target_arch`es Rust supports Linux kernel versions (3.2+) // that precede the version (3.17) in which `getrandom(2)` was added: // https://doc.rust-lang.org/stable/rustc/platform-support.html
all(
target_os = "linux",
any(
target_arch = "aarch64",
target_arch = "arm",
target_arch = "powerpc",
target_arch = "powerpc64",
target_arch = "s390x",
target_arch = "x86",
target_arch = "x86_64", // Minimum supported Linux kernel version for MUSL targets // is not specified explicitly (as of Rust 1.77) and they // are used in practice to target pre-3.17 kernels.
target_env = "musl",
),
)
))] { mod use_file; mod linux_android_with_fallback; pubuse linux_android_with_fallback::*;
} elseif#[cfg(any(
target_os = "android",
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "hurd",
target_os = "illumos",
target_os = "cygwin", // Check for target_arch = "arm" to only include the 3DS. Does not // include the Nintendo Switch (which is target_arch = "aarch64").
all(target_os = "horizon", target_arch = "arm"),
))] { mod getrandom; pubuse getrandom::*;
} elseif#[cfg(target_os = "solaris")] { mod solaris; pubuse solaris::*;
} elseif#[cfg(target_os = "netbsd")] { mod netbsd; pubuse netbsd::*;
} elseif#[cfg(target_os = "fuchsia")] { mod fuchsia; pubuse fuchsia::*;
} elseif#[cfg(any(
target_os = "ios",
target_os = "visionos",
target_os = "watchos",
target_os = "tvos",
))] { mod apple_other; pubuse apple_other::*;
} elseif#[cfg(all(target_arch = "wasm32", target_os = "wasi"))] {
cfg_if! { if#[cfg(target_env = "p1")] { mod wasi_p1; pubuse wasi_p1::*;
} elseif#[cfg(target_env = "p2")] { mod wasi_p2; pubuse wasi_p2::*;
} else {
compile_error!( "Unknown version of WASI (only previews 1 and 2 are supported) \
or Rust version older than 1.80 was used"
);
}
}
} elseif#[cfg(target_os = "hermit")] { mod hermit; pubuse hermit::*;
} elseif#[cfg(target_os = "vxworks")] { mod vxworks; pubuse vxworks::*;
} elseif#[cfg(target_os = "solid_asp3")] { mod solid; pubuse solid::*;
} elseif#[cfg(all(windows, any(target_vendor = "win7", getrandom_windows_legacy)))] { mod windows7; pubuse windows7::*;
} elseif#[cfg(windows)] { mod windows; pubuse windows::*;
} elseif#[cfg(all(target_arch = "x86_64", target_env = "sgx"))] { mod rdrand; pubuse rdrand::*;
} elseif#[cfg(all(target_arch = "wasm32", any(target_os = "unknown", target_os = "none")))] {
compile_error!(concat!( "The wasm32-unknown-unknown targets are not supported by default; \
you may need to enable the \"wasm_js\" configuration flag. Note \
that enabling the `wasm_js` feature flag alone is insufficient. \ For more information see: \
https://docs.rs/getrandom/", env!("CARGO_PKG_VERSION"), "/#webassembly-support"
));
} else {
compile_error!(concat!( "target is not supported. You may need to define a custom backend see: \
https://docs.rs/getrandom/", env!("CARGO_PKG_VERSION"), "/#custom-backend"
));
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.5Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.