X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=Cargo.toml;h=a3acccfdaea91614b98421590dd567d1a678ef58;hb=27b99acd6442f5aafe33cf20d38045f2b942244a;hp=f263dc8eccb16414c5e440b70c02bd6e9e4ab2df;hpb=08ab6581f1c6254a7765340c5c7a553db58d3a89;p=rust-lightning diff --git a/Cargo.toml b/Cargo.toml index f263dc8e..a3acccfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,24 +11,28 @@ members = [ ] exclude = [ + "lightning-custom-message", + "lightning-transaction-sync", "no-std-check", + "bench", ] -# Our tests do actual crypo 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