diff --git a/Cargo.toml b/Cargo.toml index 51a0e9c5a..5d67b7796 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ resolver = "2" # Force scrypt to build with release-like speed even in dev mode -[profile.devel.package.scrypt] +[profile.dev.package.scrypt] opt-level = 3 debug-assertions = false overflow-checks = false @@ -17,19 +17,22 @@ egui = { git = "https://github.com/bu5hm4nn/egui", rev = "63dde4c9b311da0cae0cb # Use the master branch of SDL2 to include a fix related to clang (and XCode after 14.2) sdl2 = { git = "https://github.com/Rust-SDL2/rust-sdl2", rev = "f2f1e29a416bcc22f2faf411866db2c8d9536308" } +# When compiling gossip crates themselves (in 'dev' mode), optimize a little bit +# (for fast compiles of our changes) [profile.dev] +opt-level = 1 +debug = true +debug-assertions = true +overflow-checks = true +incremental = true +codegen-units = 256 + +# But when compiling dependencies, even in dev mode, optimize fully +# (these rarely recompile during development, so we still get fast compiles) +[profile.dev.package."*"] opt-level = 3 debug = false debug-assertions = false overflow-checks = false incremental = false codegen-units = 16 - -[profile.devel] -inherits = "dev" -opt-level = 0 -debug = true -debug-assertions = true -overflow-checks = true -incremental = true -codegen-units = 256 diff --git a/build.sh b/build.sh index 5b4ad4b67..f77dd51ce 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/bash #RUSTFLAGS="-C target-cpu=native --cfg tokio_unstable" -cargo build --features=lang-cjk --release +cargo build --features=lang-cjk diff --git a/debug.sh b/debug.sh deleted file mode 100755 index a2f6d74b2..000000000 --- a/debug.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -cargo build --features=lang-cjk --release && \ - RUST_BACKTRACE=1 RUST_LOG="info,gossip_lib=debug" ./target/release/gossip "$@" \ - | tee gossip.log.txt - diff --git a/run.sh b/run.sh index 60063eaa1..2cea6b852 100755 --- a/run.sh +++ b/run.sh @@ -1,6 +1,5 @@ #!/bin/bash #RUSTFLAGS="-C target-cpu=native --cfg tokio_unstable" -cargo build --features=lang-cjk,video-ffmpeg --release && \ +cargo build --features=lang-cjk,video-ffmpeg && \ RUST_BACKTRACE=1 RUST_LOG="warn,gossip=info,gossip_lib=info,nostr_types=info,gossip_relay_picker=info" ./target/release/gossip "$@" -