mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-20 09:01:19 +02:00
Optimizing size of the final executable
This commit is contained in:
@@ -3,10 +3,9 @@ stages:
|
||||
|
||||
rust-latest:
|
||||
stage: build
|
||||
artifacts:
|
||||
- target/release/scootaloo
|
||||
image: rust:latest
|
||||
script:
|
||||
- cargo build --verbose
|
||||
- cargo build --release --verbose
|
||||
- strip target/release/${CI_PROJECT_NAME}
|
||||
- du -h target/release/${CI_PROJECT_NAME}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "scootaloo"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
authors = ["VC <veretcle+framagit@mateu.be>"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -17,3 +17,10 @@ reqwest = "^0.11"
|
||||
htmlescape = "^0.3"
|
||||
log = "^0.4"
|
||||
simple_logger = "^1.11"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 's' # Optimize for size.
|
||||
lto = true # Link Time Optimization (LTO)
|
||||
codegen-units = 1 # Set this to 1 to allow for maximum size reduction optimizations:
|
||||
panic = 'abort' # removes the need for this extra unwinding code.
|
||||
|
||||
|
Reference in New Issue
Block a user