Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
164 lines (158 loc) · 9.11 KB
/
Copy pathCargo.toml
File metadata and controls
164 lines (158 loc) · 9.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[workspace.package]
version = "6.3.0-pre.4"
edition = "2024"
rust-version = "1.93.0"
authors = ["The Tari Development Community"]
repository = "https://github.com/tari-project/tari"
license = "BSD-3-Clause"
[workspace]
members = [
"base_layer/core",
"base_layer/common_types",
"base_layer/transaction_components",
"base_layer/node_components",
"base_layer/mmr",
"base_layer/p2p",
"base_layer/service_framework",
"base_layer/wallet",
"base_layer/wallet_ffi",
"base_layer/transaction_key_manager",
"clients/rust/base_node_grpc_client",
"clients/rust/wallet_grpc_client",
"comms/core",
"comms/dht",
"comms/rpc_macros",
"common_sqlite",
"common/tari_features",
"infrastructure/libtor",
"infrastructure/metrics",
"infrastructure/shutdown",
"infrastructure/storage",
"infrastructure/tari_script",
"infrastructure/test_utils",
"buildtools/deps_only",
"applications/minotari_node",
"applications/minotari_peer_sync",
"applications/minotari_console_wallet",
"applications/minotari_app_utilities",
"applications/minotari_merge_mining_proxy",
"applications/minotari_miner",
"applications/minotari_ledger_wallet/comms",
"applications/minotari_ledger_wallet/common",
"applications/minotari_utils",
"applications/minotari_offline_signer",
"applications/minotari_mcp_common",
"applications/minotari_mcp_node",
"applications/minotari_mcp_wallet",
"integration_tests",
"hashing",
]
exclude = [
# DO NOT MOVE THIS INTO `members`. It is excluded on purpose, and the exclusion is a security property, not
# tidiness.
#
# `minotari_ledger_wallet_comms_testing` enables `minotari_ledger_wallet_comms/test_transport`, which compiles in
# the registry that lets a caller redirect the Ledger device connection (`ledger_wallet::register_transport`).
# Cargo resolves features once per package across the *selected package set*, so as a workspace member this crate
# lands in the default package selection and unifies `test_transport` into the single `comms` rlib that every
# other crate links - including `minotari_console_wallet`, for which `ledger` is a *default* feature. Release
# builds do exactly that: `.github/workflows/build_binaries.yml` runs `cargo build --bin
# minotari_console_wallet` with no `-p`, so the shipped binary would carry a redirectable transport.
#
# Verified with `cargo +nightly build -Z unstable-options --unit-graph --bin minotari_console_wallet`: as a
# member, `minotari_ledger_wallet_comms` resolves to `['default', 'test_transport']`; excluded, it resolves to
# `['default']`.
#
# As its own workspace the crate is never in this workspace's package selection, so the dangerous code is
# structurally absent from every build that does not name the crate. It is built and tested through its own
# manifest:
#
# cargo test --manifest-path applications/minotari_ledger_wallet/comms_testing/Cargo.toml
#
# Exactly one crate in this workspace depends on it: `tari_transaction_components`, as a *dev*-dependency in a
# `[target.'cfg(tari_ledger_speculos)'.dev-dependencies]` table, for the key manager suite in its
# `tests/ledger_key_manager`. Both gates matter. A dev-dependency is never resolved by a non-test build under any
# flags, so `cargo build --bin minotari_console_wallet` cannot reach it; and the custom cfg - set only by
# `scripts/ledger_speculos.sh`, through RUSTFLAGS, into `target/ledger-speculos` - keeps the crate out of every
# other test and lint invocation as well, `cargo ci-test` and `cargo ci-clippy` included, so the two checks in
# `comms_testing/src/lib.rs` still print nothing and `['default']`. A plain, ungated dev-dependency would not: a
# `cargo test --workspace` would unify `test_transport` into every binary it builds, and the first of those
# checks would print a line. (The `--all-features` in `ci-test` and `ci-clippy` switches `test_transport` on
# by itself, as a feature of `comms`, and did before this dependency existed; neither builds a shipped binary.)
# Keep the gate if you move the dependency, and do not add a second dependent.
#
# (`applications/minotari_ledger_wallet/wallet` is a separate workspace for its own reasons and is the in-repo
# precedent for this shape.)
"applications/minotari_ledger_wallet/comms_testing",
]
# Add here until we move to edition=2021
resolver = "2"
[workspace.dependencies]
tari_common = { path = "common", version = "6.3.0-pre.4" }
tari_common_sqlite = { path = "common_sqlite", version = "6.3.0-pre.4" }
tari_common_types = { path = "base_layer/common_types", version = "6.3.0-pre.4" }
tari_comms = { path = "comms/core", version = "6.3.0-pre.4" }
tari_comms_dht = { path = "comms/dht", default-features = false, version = "6.3.0-pre.4" }
tari_comms_rpc_macros = { path = "comms/rpc_macros", version = "6.3.0-pre.4" }
tari_core = { path = "base_layer/core", default-features = false, version = "6.3.0-pre.4" }
tari_features = { path = "common/tari_features", version = "6.3.0-pre.4" }
tari_hashing = { path = "hashing", version = "6.3.0-pre.4" }
tari_libtor = { path = "infrastructure/libtor", version = "6.3.0-pre.4" }
tari_node_components = { path = "base_layer/node_components", version = "6.3.0-pre.4" }
tari_metrics = { path = "infrastructure/metrics", version = "6.3.0-pre.4" }
tari_mmr = { path = "base_layer/mmr", version = "6.3.0-pre.4" }
tari_max_size = { path = "infrastructure/max_size", version = "6.3.0-pre.4" }
tari_p2p = { path = "base_layer/p2p", version = "6.3.0-pre.4" }
tari_script = { path = "infrastructure/tari_script", version = "6.3.0-pre.4" }
tari_service_framework = { path = "base_layer/service_framework", version = "6.3.0-pre.4" }
tari_shutdown = { path = "infrastructure/shutdown", version = "6.3.0-pre.4" }
tari_storage = { path = "infrastructure/storage", version = "6.3.0-pre.4" }
tari_transaction_components = { path = "base_layer/transaction_components", version = "6.3.0-pre.4" }
tari_transaction_key_manager = { path = "base_layer/transaction_key_manager", version = "6.3.0-pre.4" }
tari_test_utils = { path = "infrastructure/test_utils", version = "6.3.0-pre.4" }
minotari_app_grpc = { path = "applications/minotari_app_grpc", version = "6.3.0-pre.4" }
minotari_app_utilities = { path = "applications/minotari_app_utilities", version = "6.3.0-pre.4" }
minotari_wallet = { path = "base_layer/wallet", version = "6.3.0-pre.4" }
minotari_node_grpc_client = { path = "clients/rust/base_node_grpc_client", version = "6.3.0-pre.4" }
minotari_node_wallet_client = { path = "clients/rust/base_node_wallet_client", version = "6.3.0-pre.4" }
minotari_console_wallet = { path = "applications/minotari_console_wallet", version = "6.3.0-pre.4" }
minotari_merge_mining_proxy = { path = "applications/minotari_merge_mining_proxy", version = "6.3.0-pre.4" }
minotari_miner = { path = "applications/minotari_miner", version = "6.3.0-pre.4" }
minotari_node = { path = "applications/minotari_node", version = "6.3.0-pre.4" }
minotari_peer_sync = { path = "applications/minotari_peer_sync", version = "6.3.0-pre.4" }
minotari_wallet_ffi = { path = "base_layer/wallet_ffi", version = "6.3.0-pre.4" }
minotari_wallet_grpc_client = { path = "clients/rust/wallet_grpc_client", version = "6.3.0-pre.4" }
minotari_ledger_wallet_comms = { path = "applications/minotari_ledger_wallet/comms", version = "6.3.0-pre.4" }
minotari_ledger_wallet_common = { path = "applications/minotari_ledger_wallet/common", version = "6.3.0-pre.4" }
# There is deliberately no `minotari_ledger_wallet_comms_testing` entry here. That crate is an excluded, separate
# workspace (see `[workspace] exclude` above), and its one dependent - a cfg-gated dev-dependency of
# `tari_transaction_components` - names it by path so that nothing else can pick it up from here by accident.
minotari_mcp_common = { path = "applications/minotari_mcp_common", version = "6.3.0-pre.4" }
tari_utilities = { version = "0.10" }
tari_crypto = { version = "0.24.1" }
tari_sidechain = { version = "9.0.0" }
anyhow = { version = "1.0" }
serde_json = "1"
serde = "1"
rand = { version = "0.10.2" }
rand_core = { version = "0.10.1" }
thiserror = { version = "2" }
borsh = { version = "1.5.7" }
tokio = { version = "1.47" }
log = { version = "0.4" }
log4rs = { version = "1.4", default-features = false}
base64 = "0.22"
# 0.3.7 is the first release with the fixes for RUSTSEC-2020-0059..0062.
futures = { version = "0.3.7" }
[profile.release]
# By default, Rust will wrap an integer in release mode instead of throwing the overflow error
# seen in debug mode. Panicking at this time is better than silently using the wrong value.
overflow-checks = true
opt-level = 3
debug = false
# To enable debug symbols with dhat profiling in release mode, enable the 'dhat-heap' feature and use
# CARGO_PROFILE_* Environment Variables:
# CARGO_PROFILE_RELEASE_DEBUG=true cargo build --release --features=dhat-heap ...(Linux)
# $env:CARGO_PROFILE_RELEASE_DEBUG = "true"; cargo build --release --features=dhat-heap ...(PowerShell)
[patch.crates-io]
liblmdb-sys = { git = "https://github.com/tari-project/lmdb-rs", rev = "8d88933179c4ab7ceafb407a9615ecdd5c569a5f" }