Skip to content

Commit d9c91df

Browse files
committed
Strip symbols and enable LTO when building using the release profile
This shrinks the size of the resulting binaries by a fairly significant amount. This requires bumping the MSRV to 1.59, however.
1 parent 5500cde commit d9c91df

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions-rs/toolchain@v1
3838
with:
3939
profile: minimal
40-
toolchain: 1.58
40+
toolchain: 1.59
4141
override: true
4242
- uses: Swatinem/rust-cache@v1
4343
- uses: actions-rs/cargo@v1

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ members = [
33
"cargo-espflash",
44
"espflash",
55
]
6+
7+
[profile.release]
8+
lto = "thin"
9+
strip = true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This repository contains two applications:
1414
| [cargo-espflash] | Cargo subcommand for espflash |
1515
| [espflash] | Library and `espflash` binary (_without_ Cargo integration) |
1616

17-
> **NOTE:** requires `rustc >= 1.58.0` in order to build either application
17+
> **NOTE:** requires `rustc >= 1.59.0` in order to build either application
1818
1919
## Installation
2020

cargo-espflash/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
"Jesse Braham <[email protected]>",
77
]
88
edition = "2021"
9-
rust-version = "1.56"
9+
rust-version = "1.59"
1010
description = "Cargo subcommand for flashing Espressif devices over serial"
1111
repository = "https://github.com/esp-rs/espflash"
1212
license = "GPL-2.0"

espflash/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
"Jesse Braham <[email protected]>",
77
]
88
edition = "2021"
9-
rust-version = "1.58"
9+
rust-version = "1.59"
1010
description = "A command-line tool for flashing Espressif devices over serial"
1111
repository = "https://github.com/esp-rs/espflash"
1212
license = "GPL-2.0"

0 commit comments

Comments
 (0)