mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
This uses the newly introduced conditional configuration checks that are now configurable withint Cargo (beta). This allows us to get rid of our custom python script that checks for expected features and cfgs. This does introduce a warning regarding the unknown lint in Cargo versions prior to the current beta, but since these are not rustc errors, they won't break any builds with the "-D warnings" RUSTFLAG. Moving to this lint actually exposed the "strict" feature not being present in the lightning-invoice crate, as our python script didnt correctly parse the cfg_attr where it appeared.
66 lines
1.7 KiB
TOML
66 lines
1.7 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
|
|
members = [
|
|
"lightning",
|
|
"lightning-block-sync",
|
|
"lightning-invoice",
|
|
"lightning-net-tokio",
|
|
"lightning-persister",
|
|
"lightning-background-processor",
|
|
"lightning-rapid-gossip-sync",
|
|
"lightning-custom-message",
|
|
"lightning-transaction-sync",
|
|
"possiblyrandom",
|
|
]
|
|
|
|
exclude = [
|
|
"no-std-check",
|
|
"msrv-no-dev-deps-check",
|
|
"bench",
|
|
]
|
|
|
|
# Our tests do actual crypto and lots of work, the tradeoff for -O2 is well
|
|
# worth it. Note that we only apply optimizations to dependencies, not workspace
|
|
# crates themselves.
|
|
# https://doc.rust-lang.org/cargo/reference/profiles.html#profile-selection
|
|
[profile.dev.package."*"]
|
|
opt-level = 2
|
|
|
|
# It appears some minimal optimizations are required to inline many std methods
|
|
# and reduce the otherwise-substantial time spent in std self-checks. We do so
|
|
# here but ensure we keep LTO disabled as otherwise we're re-optimizing all our
|
|
# dependencies every time we make any local changes.
|
|
[profile.dev]
|
|
opt-level = 1
|
|
lto = "off"
|
|
|
|
[profile.release]
|
|
opt-level = 3
|
|
lto = true
|
|
panic = "abort"
|
|
|
|
[patch.crates-io.possiblyrandom]
|
|
path = "possiblyrandom"
|
|
|
|
[workspace.lints.rust.unexpected_cfgs]
|
|
level = "forbid"
|
|
# When adding a new cfg attribute, ensure that it is added to this list.
|
|
#
|
|
# Note that Cargo automatically declares corresponding cfgs for every feature
|
|
# defined in the member-level [features] tables as "expected".
|
|
check-cfg = [
|
|
"cfg(fuzzing)",
|
|
"cfg(secp256k1_fuzz)",
|
|
"cfg(hashes_fuzz)",
|
|
"cfg(test)",
|
|
"cfg(debug_assertions)",
|
|
"cfg(c_bindings)",
|
|
"cfg(ldk_bench)",
|
|
"cfg(taproot)",
|
|
"cfg(async_signing)",
|
|
"cfg(require_route_graph_test)",
|
|
"cfg(dual_funding)",
|
|
"cfg(splicing)",
|
|
"cfg(async_payments)",
|
|
]
|