Skip to content

Commit

Permalink
Switch to using Workspace style dependencies for internal crates
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Jan 7, 2025
1 parent 15157b6 commit 7594f80
Show file tree
Hide file tree
Showing 69 changed files with 605 additions and 540 deletions.
102 changes: 99 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,103 @@ inherits = "release"
debug = true

[workspace.dependencies]

# ===== RADIX DEPENDENCIES ========
# With `path-bases` we can simplify the path handling for internal crates:
# https://github.com/rust-lang/cargo/issues/14355#issuecomment-2573582438
# e.g.:
# core = "../crates/core"
# error = { path = "error", base = "core "}

# === FOR APP ===
home-cards = { path = "crates/app/home-cards" }
radix-connect = { path = "crates/app/radix-connect" }
radix-connect-models = { path = "crates/app/radix-connect-models" }
security-center = { path = "crates/app/security-center" }
signing = { path = "crates/app/signing" }
signing-traits = { path = "crates/app/signing-traits" }
key-derivation-traits = { path = "crates/app/key-derivation-traits" }

# === COMMON ===
build-info = { path = "crates/common/build-info" }
bytes = { path = "crates/common/bytes" }
entity-foundation = { path = "crates/common/entity-foundation" }
host-info = { path = "crates/common/host-info" }
identified-vec-of = { path = "crates/common/identified-vec-of" }
metadata = { path = "crates/common/metadata" }
network = { path = "crates/common/network" }
numeric = { path = "crates/common/numeric" }
short-string = { path = "crates/common/short-string" }

# === CORE ===
assert-json = { path = "crates/core/assert-json" }
core-collections = { path = "crates/core/collections" }
error = { path = "crates/core/error" }
has-sample-values = { path = "crates/core/has-sample-values" }
core-misc = { path = "crates/core/misc" }
time-utils = { path = "crates/core/time-utils" }
core-utils = { path = "crates/core/utils" }

# === CRYPTO ===
cap26-models = { path = "crates/crypto/cap26-models" }
addresses = { path = "crates/crypto/addresses" }
ecc = { path = "crates/crypto/ecc" }
encryption = { path = "crates/crypto/encryption" }
hash = { path = "crates/crypto/hash" }
hierarchical-deterministic = { path = "crates/crypto/hd" }

# === FACTORS ===
factors = { path = "crates/factors/factors" }
factor-instances-provider = { path = "crates/factors/instances-provider" }
keys-collector = { path = "crates/factors/keys-collector" }
next-derivation-index-ephemeral = { path = "crates/factors/next-derivation-index-ephemeral" }
factors-supporting-types = { path = "crates/factors/supporting-types" }

# === GATEWAY ===
gateway-client-and-api = { path = "crates/gateway/client-and-api" }
gateway-models = { path = "crates/gateway/models" }

# === PROFILE ===
profile-logic = { path = "crates/profile/logic/logic_SPLIT_ME" }
account-for-display = { path = "crates/profile/models/account-for-display" }
profile-account-or-persona = { path = "crates/profile/models/account-or-persona" }
profile-account = { path = "crates/profile/models/account" }
profile-app-preferences = { path = "crates/profile/models/app-preferences" }
profile-base-entity = { path = "crates/profile/models/base-entity" }
profile-gateway = { path = "crates/profile/models/gateway" }
profile-persona-data = { path = "crates/profile/models/persona-data" }
profile-persona = { path = "crates/profile/models/persona" }
profile = { path = "crates/profile/models/profile_SPLIT_ME" }
profile-security-structures = { path = "crates/profile/models/security-structures" }
profile-supporting-types = { path = "crates/profile/models/supporting-types" }
entity-by-address = { path = "crates/profile/traits/entity-by-address" }

# === SARGON - SPLIT ME ===
sargon = { path = "crates/sargon_SPLIT_ME" }

# === SYSTEM ===
clients = { path = "crates/system/clients/clients" }
http-client = { path = "crates/system/clients/http" }
drivers = { path = "crates/system/drivers" }
sub-systems = { path = "crates/system/sub-systems" }
profile-state-holder = { path = "crates/system/profile-state-holder" }
interactors = { path = "crates/system/interactors" }
sargon-os-accounts = { path = "crates/system/os/accounts" }
sargon-os-factors = { path = "crates/system/os/factors" }
sargon-os = { path = "crates/system/os/os" }
sargon-os-security-center = { path = "crates/system/os/security-center" }
sargon-os-signing = { path = "crates/system/os/signing" }
sargon-os-transaction = { path = "crates/system/os/transaction" }

# === TRANSACTION ===
transaction-foundation = { path = "crates/transaction/foundation" }
manifests = { path = "crates/transaction/manifests" }
transaction-models = { path = "crates/transaction/models" }

# === UNIFFI ===
sargon-uniffi = { path = "crates/uniffi/uniffi_SPLIT_ME" }
sargon-uniffi-conversion-macros = { path = "crates/uniffi/conversion-macros" }


# ==== RADIX DEPENDENCIES ====
radix-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v1.3.0", features = [
"serde",
"secp256k1_sign_and_validate",
Expand All @@ -209,7 +304,8 @@ radix-rust = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v1.3
radix-transactions = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v1.3.0" }
sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v1.3.0" }

# ===== EXTERNAL DEPENDENCIES ========

# ==== EXTERNAL DEPENDENCIES ====

# actix-rt = "3.3.0"
actix-rt = { git = "https://github.com/actix/actix-net", rev = "57fd6ea8098d1f2d281c305fc331216c4fe1992e" }
Expand Down
18 changes: 9 additions & 9 deletions crates/app/home-cards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
identified-vec-of = { path = "../../common/identified-vec-of" }
addresses = { path = "../../crypto/addresses" }
bytes = { path = "../../common/bytes" }
core-utils = { path = "../../core/utils" }
network = { path = "../../common/network" }
metadata = { path = "../../common/metadata" }
drivers = { path = "../../system/drivers" }
gateway-client-and-api = { path = "../../gateway/client-and-api" }
gateway-models = { path = "../../gateway/models" }
identified-vec-of = { workspace = true }
addresses = { workspace = true }
bytes = { workspace = true }
core-utils = { workspace = true }
network = { workspace = true }
metadata = { workspace = true }
drivers = { workspace = true }
gateway-client-and-api = { workspace = true }
gateway-models = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
16 changes: 8 additions & 8 deletions crates/app/key-derivation-traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
core-collections = { path = "../../core/collections" }
error = { path = "../../core/error" }
has-sample-values = { path = "../../core/has-sample-values" }
addresses = { path = "../../crypto/addresses" }
factors = { path = "../../factors/factors" }
cap26-models = { path = "../../crypto/cap26-models" }
hierarchical-deterministic = { path = "../../crypto/hd" }
factors-supporting-types = { path = "../../factors/supporting-types" }
core-collections = { workspace = true }
error = { workspace = true }
has-sample-values = { workspace = true }
addresses = { workspace = true }
factors = { workspace = true }
cap26-models = { workspace = true }
hierarchical-deterministic = { workspace = true }
factors-supporting-types = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
12 changes: 6 additions & 6 deletions crates/app/radix-connect-models/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
error = { path = "../../core/error" }
has-sample-values = { path = "../../core/has-sample-values" }
core-misc = { path = "../../core/misc" }
bytes = { path = "../../common/bytes" }
network = { path = "../../common/network" }
addresses = { path = "../../crypto/addresses" }
error = { workspace = true }
has-sample-values = { workspace = true }
core-misc = { workspace = true }
bytes = { workspace = true }
network = { workspace = true }
addresses = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
36 changes: 18 additions & 18 deletions crates/app/radix-connect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ build = "build.rs"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
core-utils = { path = "../../core/utils" }
addresses = { path = "../../crypto/addresses" }
identified-vec-of = { path = "../../common/identified-vec-of" }
ecc = { path = "../../crypto/ecc" }
hash = { path = "../../crypto/hash" }
bytes = { path = "../../common/bytes" }
profile-persona-data = { path = "../../profile/models/persona-data" }
core-misc = { path = "../../core/misc" }
http-client = { path = "../../system/clients/http" }
drivers = { path = "../../system/drivers" }
encryption = { path = "../../crypto/encryption" }
transaction-foundation = { path = "../../transaction/foundation" }
transaction-models = { path = "../../transaction/models" }
entity-foundation = { path = "../../common/entity-foundation" }
short-string = { path = "../../common/short-string" }
has-sample-values = { path = "../../core/has-sample-values" }
radix-connect-models = { path = "../../app/radix-connect-models" }
assert-json = { workspace = true }
core-utils = { workspace = true }
addresses = { workspace = true }
identified-vec-of = { workspace = true }
ecc = { workspace = true }
hash = { workspace = true }
bytes = { workspace = true }
profile-persona-data = { workspace = true }
core-misc = { workspace = true }
http-client = { workspace = true }
drivers = { workspace = true }
encryption = { workspace = true }
transaction-foundation = { workspace = true }
transaction-models = { workspace = true }
entity-foundation = { workspace = true }
short-string = { workspace = true }
has-sample-values = { workspace = true }
radix-connect-models = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
10 changes: 5 additions & 5 deletions crates/app/security-center/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
addresses = { path = "../../crypto/addresses" }
has-sample-values = { path = "../../core/has-sample-values" }
core-misc = { path = "../../core/misc" }
profile-app-preferences = { path = "../../profile/models/app-preferences" }
assert-json = { workspace = true }
addresses = { workspace = true }
has-sample-values = { workspace = true }
core-misc = { workspace = true }
profile-app-preferences = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
24 changes: 12 additions & 12 deletions crates/app/signing-traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
error = { path = "../../core/error" }
ecc = { path = "../../crypto/ecc" }
core-collections = { path = "../../core/collections" }
bytes = { path = "../../common/bytes" }
hash = { path = "../../crypto/hash" }
radix-connect-models = { path = "../../app/radix-connect-models" }
transaction-models = { path = "../../transaction/models" }
entity-by-address = { path = "../../profile/traits/entity-by-address" }
profile-account-or-persona = { path = "../../profile/models/account-or-persona" }
profile-persona = { path = "../../profile/models/persona" }
profile-account = { path = "../../profile/models/account" }
metadata = { path = "../../common/metadata" }
error = { workspace = true }
ecc = { workspace = true }
core-collections = { workspace = true }
bytes = { workspace = true }
hash = { workspace = true }
radix-connect-models = { workspace = true }
transaction-models = { workspace = true }
entity-by-address = { workspace = true }
profile-account-or-persona = { workspace = true }
profile-persona = { workspace = true }
profile-account = { workspace = true }
metadata = { workspace = true }

# === RADIX DEPENDENCIES ===
radix-engine-interface = { workspace = true }
Expand Down
44 changes: 22 additions & 22 deletions crates/app/signing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ build = "build.rs"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
addresses = { path = "../../crypto/addresses" }
has-sample-values = { path = "../../core/has-sample-values" }
core-misc = { path = "../../core/misc" }
core-collections = { path = "../../core/collections" }
bytes = { path = "../../common/bytes" }
ecc = { path = "../../crypto/ecc" }
metadata = { path = "../../common/metadata" }
hash = { path = "../../crypto/hash" }
cap26-models = { path = "../../crypto/cap26-models" }
transaction-models = { path = "../../transaction/models" }
network = { path = "../../common/network" }
identified-vec-of = { path = "../../common/identified-vec-of" }
radix-connect-models = { path = "../../app/radix-connect-models" }
profile-account-or-persona = { path = "../../profile/models/account-or-persona" }
profile-persona = { path = "../../profile/models/persona" }
profile-base-entity = { path = "../../profile/models/base-entity" }
profile-account = { path = "../../profile/models/account" }
entity-foundation = { path = "../../common/entity-foundation" }
profile-security-structures = { path = "../../profile/models/security-structures" } # TODO only RoleKind and FactorListKind and GeneralRoleWithHierarchicalDeterministicFactorInstances? maybe move to a smaller crate?
entity-by-address = { path = "../../profile/traits/entity-by-address" }
signing-traits = { path = "../../app/signing-traits" }
assert-json = { workspace = true }
addresses = { workspace = true }
has-sample-values = { workspace = true }
core-misc = { workspace = true }
core-collections = { workspace = true }
bytes = { workspace = true }
ecc = { workspace = true }
metadata = { workspace = true }
hash = { workspace = true }
cap26-models = { workspace = true }
transaction-models = { workspace = true }
network = { workspace = true }
identified-vec-of = { workspace = true }
radix-connect-models = { workspace = true }
profile-account-or-persona = { workspace = true }
profile-persona = { workspace = true }
profile-base-entity = { workspace = true }
profile-account = { workspace = true }
entity-foundation = { workspace = true }
profile-security-structures = { workspace = true } # TODO only RoleKind and FactorListKind and GeneralRoleWithHierarchicalDeterministicFactorInstances? maybe move to a smaller crate?
entity-by-address = { workspace = true }
signing-traits = { workspace = true }

# === RADIX DEPENDENCIES ===
radix-engine-interface = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions crates/common/build-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
error = { path = "../../core/error" }
has-sample-values = { path = "../../core/has-sample-values" }
assert-json = { workspace = true }
error = { workspace = true }
has-sample-values = { workspace = true }

# === RADIX DEPENDENCIES ===
radix-engine = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions crates/common/bytes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
error = { path = "../../core/error" }
has-sample-values = { path = "../../core/has-sample-values" }
assert-json = { workspace = true }
error = { workspace = true }
has-sample-values = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
6 changes: 3 additions & 3 deletions crates/common/entity-foundation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
error = { path = "../../core/error" }
has-sample-values = { path = "../../core/has-sample-values" }
assert-json = { workspace = true }
error = { workspace = true }
has-sample-values = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
6 changes: 3 additions & 3 deletions crates/common/host-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
has-sample-values = { path = "../../core/has-sample-values" }
time-utils = { path = "../../core/time-utils" }
assert-json = { workspace = true }
has-sample-values = { workspace = true }
time-utils = { workspace = true }

# === RADIX DEPENDENCIES ===
# None
Expand Down
4 changes: 2 additions & 2 deletions crates/common/identified-vec-of/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
assert-json = { path = "../../core/assert-json" }
error = { path = "../../core/error" }
assert-json = { workspace = true }
error = { workspace = true }

# === RADIX DEPENDENCIES
# None
Expand Down
2 changes: 1 addition & 1 deletion crates/common/metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

[dependencies]
# === SARGON CRATES ===
has-sample-values = { path = "../../core/has-sample-values" }
has-sample-values = { workspace = true }

# === RADIX DEPENDENCIES ===
radix-engine-interface = { workspace = true }
Expand Down
Loading

0 comments on commit 7594f80

Please sign in to comment.