Skip to content

Commit

Permalink
chore: add build profiles
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Feb 3, 2024
1 parent 0bcf9c2 commit 06b0d65
Showing 1 changed file with 59 additions and 6 deletions.
65 changes: 59 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "pace-rs"
authors = ["the pace-rs team"]
version = "0.1.0"
edition = "2021"
repository = "https://github.com/pace-rs/pace"
license = "AGPL-3.0-or-later"
authors = ["the pace-rs team"]
categories = ["command-line-utilities"]
edition = "2021"
keywords = ["cli"]
license = "AGPL-3.0-or-later"
repository = "https://github.com/pace-rs/pace"
description = "pace - timetracking for the command line"

[package.metadata.wix]
Expand All @@ -15,7 +15,6 @@ path-guid = "441ECBBB-93E2-4DC2-9D74-F4B116EDFABE"
license = false
eula = false


[dependencies]
clap = "4"
serde = { version = "1", features = ["serde_derive"] }
Expand Down Expand Up @@ -45,7 +44,61 @@ ci = ["github"]
# The installers to generate for each app
installers = ["shell", "powershell", "msi"]
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]
targets = [
"aarch64-apple-darwin",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc",
]
# Publish jobs to run in CI
pr-run-mode = "plan"

# see: https://nnethercote.github.io/perf-book/build-configuration.html
[profile.dev]
opt-level = 0
debug = true
rpath = false
lto = false
debug-assertions = true
codegen-units = 4

# compile dependencies with optimizations in dev mode
# see: https://doc.rust-lang.org/stable/cargo/reference/profiles.html#overrides
[profile.dev.package."*"]
opt-level = 3
debug = true

[profile.release]
opt-level = 3
debug = false # true for profiling
rpath = false
lto = "fat"
debug-assertions = false
codegen-units = 1
strip = true
panic = "abort"

[profile.test]
opt-level = 1
debug = true
rpath = false
lto = false
debug-assertions = true
codegen-units = 4

[profile.bench]
opt-level = 3
debug = true # true for profiling
rpath = false
lto = true
debug-assertions = false
codegen-units = 1

# Allows quick RPM file generation, if "cargo-generate-rpm" is installed:
# cargo build --release; cargo generate-rpm
# will result in a file like target/generate-rpm/rustic-rs-0.6.1-1.x86_64.rpm
[package.metadata.generate-rpm]
assets = [
{ source = "target/release/pace", dest = "/usr/bin/pace", mode = "0755", config = false, doc = false }, # user = "root", group = "root" },
]

0 comments on commit 06b0d65

Please sign in to comment.