diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 285b77c..3dd9c9f 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -14,3 +14,10 @@ nostr-sdk = { git = "https://github.com/rust-nostr/nostr", rev = "3b988fb13e0ea [build-dependencies] flutter_rust_bridge_codegen = "=2.0.0" + +[profile.release] +opt-level = 'z' # Optimize for size. +lto = true # Enable Link Time Optimization +codegen-units = 1 # Reduce the number of codegen units to increase optimizations. +panic = "abort" # Abort on panic +strip = true # Strip symbols from binary. diff --git a/rust/cargokit.yml b/rust/cargokit.yml index 8aa4a7b..00df9fc 100644 --- a/rust/cargokit.yml +++ b/rust/cargokit.yml @@ -1,12 +1,3 @@ -cargo: - debug: - toolchain: stable - release: - toolchain: nightly - extra_flags: - - -Z - - build-std=panic_abort,std - precompiled_binaries: # Uri prefix used when downloading precompiled binaries. url_prefix: https://github.com/rust-nostr/nostr-sdk-flutter/releases/download/precompiled_