Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
113 lines (104 loc) · 4.47 KB
/
Copy pathCargo.toml
File metadata and controls
113 lines (104 loc) · 4.47 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
[workspace]
resolver = "2"
members = [
"crates/rbitcoin-primitives",
"crates/rbitcoin-log",
"crates/rbitcoin-store",
"crates/rbitcoin-query",
"crates/rbitcoin-consensus",
"crates/rbitcoin-mempool",
"crates/rbitcoin-net",
"crates/rbitcoin-ibd",
"crates/rbitcoin-rpc",
"crates/rbitcoin-electrum",
"crates/rbitcoin-esplora",
"crates/rbitcoin-sv2",
"crates/rbitcoin-cli",
"crates/rbitcoin-node",
"crates/rbitcoin-test",
"crates/rbitcoin-bench",
]
default-members = ["crates/rbitcoin-node"]
[workspace.package]
version = "0.8.99"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/reardencode/rbitcoin"
# Matches CI + nixpkgs/crane pin (rustc 1.95). Not a lower “aspirational” MSRV.
rust-version = "1.95"
[workspace.dependencies]
rbitcoin-primitives = { path = "crates/rbitcoin-primitives" }
rbitcoin-log = { path = "crates/rbitcoin-log" }
rbitcoin-store = { path = "crates/rbitcoin-store" }
rbitcoin-query = { path = "crates/rbitcoin-query" }
# `default-features = false`: the `corpus` default is only for this
# package's own suite. A node build does not compile the script assembler.
rbitcoin-consensus = { path = "crates/rbitcoin-consensus", default-features = false }
rbitcoin-mempool = { path = "crates/rbitcoin-mempool" }
rbitcoin-net = { path = "crates/rbitcoin-net" }
rbitcoin-ibd = { path = "crates/rbitcoin-ibd" }
rbitcoin-rpc = { path = "crates/rbitcoin-rpc" }
rbitcoin-electrum = { path = "crates/rbitcoin-electrum" }
rbitcoin-esplora = { path = "crates/rbitcoin-esplora" }
rbitcoin-sv2 = { path = "crates/rbitcoin-sv2" }
rbitcoin-cli = { path = "crates/rbitcoin-cli" }
rbitcoin-node = { path = "crates/rbitcoin-node" }
rbitcoin-test = { path = "crates/rbitcoin-test" }
rbitcoin-bench = { path = "crates/rbitcoin-bench" }
# JSON for Electrum (and tests). No other serde derives in core crates.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Esplora REST + wallet WebSocket live updates.
axum = "0.8"
tower = { version = "0.5", features = ["limit"] }
tower-http = { version = "0.7", features = ["limit", "timeout"] }
# rust-bitcoin stack
# No `bitcoinconsensus` feature — we verify scripts in pure Rust (see rbitcoin-consensus::script).
bitcoin = { version = "0.32.102", default-features = true }
bitcoin_hashes = "0.14.101"
# BIP324 v2 encrypted P2P transport (tokio async ProtocolReader/Writer).
bip324 = { version = "0.11", default-features = true, features = ["tokio"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "sync", "time", "rt", "signal", "fs"] }
# Lock-free Arc publish for immutable pin outs/layout halves
arc-swap = "1"
# Process-wide heap for product binaries (musl static + glibc). Replaces the
# platform default (musl/glibc malloc) via #[global_allocator] in each bin.
mimalloc = "0.1"
# Stratum v2 wire crates, pinned to the Step 0 spike set
# (docs/sv2-template-provider.md). Messages decode with `binary_sv2::from_bytes`
# on the known types; `parsers_sv2` is not needed.
noise_sv2 = "=2.0.0"
codec_sv2 = { version = "=7.0.0", features = ["noise_sv2"] }
binary_sv2 = "=7.0.0"
common_messages_sv2 = "=9.0.0"
template_distribution_sv2 = "=7.0.0"
# Fail the build on rustc warnings (unused imports, dead code, …).
[workspace.lints.rust]
warnings = "deny"
unsafe_op_in_unsafe_fn = "deny"
# cargo-llvm-cov sets `cfg(coverage)` so diagnostic microbenches can use
# `#[cfg(not(coverage))]` and stay out of the first-party LCOV denominator.
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(coverage)'] }
# Clippy: CI is `clippy --workspace --all-targets -- -D warnings`.
# No workspace allow list. A leftover lint is `#[allow(clippy::…)]` on
# the item with a reason (`docs/code-shape.md`).
# Nursery opt-in: Core-faithful loops fail CI unless site-allowed.
[workspace.lints.clippy]
cognitive_complexity = "warn"
undocumented_unsafe_blocks = "deny"
# Workspace crates keep line tables (panic file and line). `*` matches
# dependencies only and compiles them with no debug info. `test` inherits
# `dev`; both profiles set the same values. Release debug info stays off
# in nix/rbitcoin.nix and release.yml.
[profile.dev]
debug = "line-tables-only"
[profile.test]
debug = "line-tables-only"
[profile.dev.package."*"]
debug = false
[profile.test.package."*"]
# `*` is dependencies only (workspace crates keep the profile above).
# Optimized crypto and codec crates make block hashing in tests cheap.
# rust-cache holds the dep build across CI runs.
opt-level = 2
debug = false