Merge pull request #2861 from tnull/2024-01-introduce-cargo-audit
[rust-lightning] / Cargo.toml
1 [workspace]
2 resolver = "2"
3
4 members = [
5     "lightning",
6     "lightning-block-sync",
7     "lightning-invoice",
8     "lightning-net-tokio",
9     "lightning-persister",
10     "lightning-background-processor",
11     "lightning-rapid-gossip-sync",
12     "lightning-custom-message",
13     "lightning-transaction-sync",
14 ]
15
16 exclude = [
17     "no-std-check",
18     "msrv-no-dev-deps-check",
19     "bench",
20 ]
21
22 # Our tests do actual crypto and lots of work, the tradeoff for -O2 is well
23 # worth it. Note that we only apply optimizations to dependencies, not workspace
24 # crates themselves.
25 # https://doc.rust-lang.org/cargo/reference/profiles.html#profile-selection
26 [profile.dev.package."*"]
27 opt-level = 2
28
29 # It appears some minimal optimizations are required to inline many std methods
30 # and reduce the otherwise-substantial time spent in std self-checks. We do so
31 # here but ensure we keep LTO disabled as otherwise we're re-optimizing all our
32 # dependencies every time we make any local changes.
33 [profile.dev]
34 opt-level = 1
35 lto = "off"
36
37 [profile.release]
38 opt-level = 3
39 lto = true
40 panic = "abort"