mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 15:02:20 +01:00
In the next commit we'll drop the `ahash` dependency in favor of directly calling `getrandom` to seed our hash tables. However, we'd like to depend on `getrandom` only on certain platforms *and* only when certain features (no-std) are set. This introduces an indirection crate to do so, allowing us to depend on it only when `no-std` is set but only depending on `getrandom` on platforms which it supports.
21 lines
693 B
TOML
21 lines
693 B
TOML
[package]
|
|
name = "possiblyrandom"
|
|
version = "0.1.0"
|
|
authors = ["Matt Corallo"]
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/lightningdevkit/rust-lightning/"
|
|
description = """
|
|
A crate that wraps getrandom and always compiles, returning 0s when no randomness is available.
|
|
"""
|
|
edition = "2021"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
|
|
[dependencies]
|
|
getrandom = { version = "0.2", optional = true, default-features = false }
|
|
|
|
# Enable getrandom if we are on a platform that (likely) supports it
|
|
[target.'cfg(not(any(target_os = "unknown", target_os = "none")))'.dependencies]
|
|
getrandom = { version = "0.2", default-features = false }
|