Add required dependencies, formatting

This commit is contained in:
Christian Reitter 2025-06-29 19:25:24 +02:00
parent 5bb47117ba
commit 3204e18fa3
1 changed files with 15 additions and 9 deletions

View File

@ -7,15 +7,15 @@ homepage = "https://github.com/rust-bitcoin/rust-bip39/"
repository = "https://github.com/rust-bitcoin/rust-bip39/" repository = "https://github.com/rust-bitcoin/rust-bip39/"
documentation = "https://docs.rs/bip39/" documentation = "https://docs.rs/bip39/"
description = "Library for BIP-39 Bitcoin mnemonic codes" description = "Library for BIP-39 Bitcoin mnemonic codes"
keywords = [ "crypto", "bitcoin", "bip39", "mnemonic" ] keywords = ["crypto", "bitcoin", "bip39", "mnemonic"]
readme = "README.md" readme = "README.md"
edition = "2018" edition = "2018"
[features] [features]
default = [ "std" ] default = ["std"]
std = [ "alloc", "serde/std", "unicode-normalization/std" ] std = ["alloc", "serde/std", "unicode-normalization/std"]
rand = [ "crate_rand", "rand_core" ] rand = ["crate_rand", "rand_core"]
alloc = [ "unicode-normalization" ] alloc = ["unicode-normalization"]
# Note: English is the standard for bip39 so always included # Note: English is the standard for bip39 so always included
chinese-simplified = [] chinese-simplified = []
@ -37,25 +37,31 @@ all-languages = [
"japanese", "japanese",
"korean", "korean",
"portuguese", "portuguese",
"spanish" "spanish",
] ]
[dependencies] [dependencies]
rand_core = { version = ">=0.4.0, <0.7.0", optional = true } rand_core = { version = ">=0.4.0, <0.7.0", optional = true }
crate_rand = { package = "rand", version = ">=0.6.0, <0.9.0", optional = true } crate_rand = { package = "rand", version = ">=0.6.0, <0.9.0", optional = true }
serde = { version = "1.0", default-features = false, features = [ "alloc" ], optional = true } serde = { version = "1.0", default-features = false, features = [
"alloc",
], optional = true }
# Enabling this feature raises the MSRV to 1.51 # Enabling this feature raises the MSRV to 1.51
zeroize = { version = "1.5", features = ["zeroize_derive"], optional = true } zeroize = { version = "1.5", features = ["zeroize_derive"], optional = true }
# Unexported dependnecies # Unexported dependencies
bitcoin_hashes = { version = ">=0.12, <=0.13", default-features = false } bitcoin_hashes = { version = ">=0.12, <=0.13", default-features = false }
unicode-normalization = { version = "0.1.22", default-features = false, optional = true } unicode-normalization = { version = "0.1.22", default-features = false, optional = true }
# faster PBKDF2 implementation
fastpbkdf2 = { git = "https://github.com/invd/rust-fastpbkdf2.git", branch = "master" }
itertools = { version = "0.8" }
[dev-dependencies] [dev-dependencies]
# Enabling the "rand" feature by default to run the benches # Enabling the "rand" feature by default to run the benches
bip39 = { path = ".", features = ["rand"] } bip39 = { path = ".", features = ["rand"] }
bitcoin_hashes = ">=0.12,<0.14" # enable default features for test bitcoin_hashes = ">=0.12,<0.14" # enable default features for test
[package.metadata.docs.rs] [package.metadata.docs.rs]