program: Explicitly pull in `getrandom` with `custom` feature (#32382)

This commit is contained in:
Jon Cinque 2023-07-05 23:09:27 +02:00 committed by GitHub
parent e1061e83ec
commit 510458ebc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -36,6 +36,15 @@ solana-frozen-abi-macro = { workspace = true }
solana-sdk-macro = { workspace = true }
thiserror = { workspace = true }
# This is currently needed to build on-chain programs reliably.
# Borsh 0.10 may pull in hashbrown 0.13, which uses ahash 0.8, which uses
# getrandom 0.2 underneath. This explicit dependency allows for no-std if cargo
# upgrades Borsh's dependency to hashbrown 0.13.
# Remove this once borsh 0.11 or 1.0 is released, which correctly declares the
# hashbrown dependency as optional.
[target.'cfg(target_os = "solana")'.dependencies]
getrandom = { version = "0.2", features = ["custom"] }
[target.'cfg(not(target_os = "solana"))'.dependencies]
ark-bn254 = { workspace = true }
ark-ec = { workspace = true }