Skip to content

Commit

Permalink
refactor: improve workspace layout
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich committed Jun 9, 2024
1 parent 0c3f993 commit d85a9e2
Show file tree
Hide file tree
Showing 63 changed files with 120 additions and 74 deletions.
51 changes: 47 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
[workspace]
members = [
"core",
"bip32",
"bip39",
"ledger",
"crates/*"
]
resolver = "2"

[workspace.package]
version = "0.11.0"
authors = [
"Summa <team@summa.one>",
"James Prestwich <james@prestwi.ch>",
]
edition = "2021"
repository = "https://github.com/summa-tx/coins"
license = "MIT OR Apache-2.0"
rust-version = "1.65"

[workspace.dependencies]
coins-bip32 = { path = "crates/bip32" }
coins-bip39 = { path = "crates/bip39" }
coins-core = { path = "crates/core" }
coins-ledger = { path = "crates/ledger" }

# core
base64 = "0.21"
bech32 = "0.9"
bs58 = "0.5.1"
digest = "0.10.7"
generic-array = "0.14.7"
hex = { package = "const-hex", version = "1.12.0" }
ripemd = "0.1.3"
serde = "1.0.203"
sha3 = "0.10.8"

# bip32
hmac = "0.12.1"
k256 = { version = "0.13.3", features = ["std", "arithmetic"] }
sha2 = "0.10.8"
thiserror = "1.0.61"

# bip39
bitvec = "1.0.1"
pbkdf2 = "0.12.2"
rand = "0.8.5"
once_cell = "1.19.0"

# ledger
async-trait = "0.1.80"
cfg-if = "1.0.0"

27 changes: 0 additions & 27 deletions bip32/Cargo.toml

This file was deleted.

24 changes: 0 additions & 24 deletions core/Cargo.toml

This file was deleted.

30 changes: 30 additions & 0 deletions crates/bip32/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
name = "coins-bip32"
version.workspace = true
authors.workspace = true
edition.workspace = true
repository.workspace = true
license.workspace = true

categories = ["cryptography"]
keywords = ["bip32", "bitcoin", "cryptocurrency", "blockchain"]
description = "Bip32 in Rust"

[dependencies]
coins-core.workspace = true

bs58.workspace = true
digest.workspace = true
hmac.workspace = true
k256.workspace = true
serde.workspace = true
sha2.workspace = true
thiserror.workspace = true

[dev-dependencies]
hex = "0.4"

[features]
default = ["mainnet"]
mainnet = []
testnet = []
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 10 additions & 9 deletions bip39/Cargo.toml → crates/bip39/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,23 @@ repository = "https://github.com/summa-tx/coins"
license = "MIT OR Apache-2.0"

[dependencies]
coins-bip32 = { version = "0.8.3", path = "../bip32" }
coins-bip32.workspace = true

bitvec = "1.0"
hmac = "0.12"
pbkdf2 = "0.12"
rand = "0.8"
sha2 = "0.10"
thiserror = "1.0"
hmac.workspace = true
bitvec.workspace = true
pbkdf2.workspace = true
rand.workspace = true
sha2.workspace = true
thiserror.workspace = true

# used by all wordlists
once_cell = { version = "1.18", optional = true }
once_cell = { workspace = true, optional = true }

[dev-dependencies]
hex = "0.4"
hex.workspace = true

[features]
once_cell = ["dep:once_cell"]
default = ["all-langs"]
all-langs = [
"chinese-simplified",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "coins-core"
version = "0.8.7"
authors = ["James Prestwich <james@prestwi.ch>"]
edition = "2018"
description = "Core library for coins-bip32 and coins-bip39"
repository = "https://github.com/summa-tx/coins"
license = "MIT OR Apache-2.0"

[dependencies]
base64.workspace = true
bech32.workspace = true
bs58 = { workspace = true, features = ["check"] }
digest.workspace = true
generic-array.workspace = true
hex.workspace = true
ripemd.workspace = true
serde = { workspace = true, features = ["derive"] }
sha2.workspace = true
sha3.workspace = true
thiserror.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 12 additions & 10 deletions ledger/Cargo.toml → crates/ledger/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
[package]
name = "coins-ledger"
version = "0.10.1"

version.workspace = true
edition.workspace = true
repository.workspace = true
license.workspace = true

authors = [
"Summa <team@summa.one>",
"James Prestwich <james@summa.one>",
"James Prestwich <james@prestwi.ch>",
"Zondax GmbH <info@zondax.ch>",
]
edition = "2018"
categories = ["authentication", "cryptography"]
keywords = ["ledger", "apdu", "cryptocurrency"]
repository = "https://github.com/summa-tx/coins"
license = "MIT OR Apache-2.0"
description = "Ledger Nano X/S connection and communication management library"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
async-trait = "0.1"
cfg-if = "1.0"
hex = "0.4"
thiserror = "1.0"
async-trait.workspace = true
cfg-if.workspace = true
hex.workspace = true
thiserror.workspace = true

# native
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
once_cell = "1.18.0"
once_cell.workspace = true
byteorder = "1.5"
tracing = "0.1"
hidapi-rusb = "1.3"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d85a9e2

Please sign in to comment.