X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=Cargo.toml;h=ec9edb3ac33076af7833898f9c5347db4f34fda5;hb=refs%2Fheads%2Fupstream%2Fmain;hp=e8565e7ac0945d6a189079f40b5c91c96326c1c1;hpb=33720b07a06e70cef099639d054aada6bb96a3d5;p=rust-lightning diff --git a/Cargo.toml b/Cargo.toml index e8565e7a..ec9edb3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,35 +1,44 @@ [workspace] +resolver = "2" members = [ "lightning", "lightning-block-sync", - "lightning-transaction-sync", "lightning-invoice", "lightning-net-tokio", "lightning-persister", "lightning-background-processor", - "lightning-rapid-gossip-sync" + "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 -O1 is well worth it. -# Ideally we would only do this in profile.test, but profile.test only applies to -# the test binary, not dependencies, which means most of the critical code still -# gets compiled as -O0. See +# 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 -panic = "abort" +lto = "off" [profile.release] opt-level = 3 lto = true panic = "abort" -[profile.bench] -opt-level = 3 -codegen-units = 1 -lto = true +[patch.crates-io.possiblyrandom] +path = "possiblyrandom"