mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
build: enable thin LTO and single codegen units for release
Smaller/faster production binary (verified: cargo build --release -p xmedia-bot builds clean with the new profile). panic=abort is intentionally not set — queue workers and db closures rely on JoinHandle catching panics, which abort would defeat.
This commit is contained in:
+6
-1
@@ -2,6 +2,11 @@
|
|||||||
members = ["crates/x-media", "crates/xmedia-bot"]
|
members = ["crates/x-media", "crates/xmedia-bot"]
|
||||||
resolver = "3"
|
resolver = "3"
|
||||||
|
|
||||||
# Smaller production binary; debug symbols are not shipped anyway.
|
# Smaller/faster production binary: strip debug symbols, link-time
|
||||||
|
# optimization across crates, and one codegen unit per crate (bigger LTO
|
||||||
|
# wins). panic=abort is intentionally NOT set: queue workers and db
|
||||||
|
# closures rely on JoinHandle catching panics, which abort would defeat.
|
||||||
[profile.release]
|
[profile.release]
|
||||||
strip = true
|
strip = true
|
||||||
|
lto = "thin"
|
||||||
|
codegen-units = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user