Skip to content

Commit

Permalink
build(cargo): add custom build profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Feb 22, 2025
1 parent 3d327c4 commit 1756983
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,16 @@ features = [
"Media",
"Media_Control"
]

[profile.dev-jeezy]
inherits = "dev"
debug = false
opt-level = 1

[profile.dev-jeezy.package."*"]
opt-level = 3

[profile.release-jeezy]
inherits = "release"
incremental = true
codegen-units = 256
13 changes: 11 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,22 @@ build-targets *targets:
"{{ targets }}" -split ' ' | ForEach-Object { just build-target $_ }

build-target target:
cargo +stable build --release --package {{ target }} --locked
cargo +stable build --package {{ target }} --locked --profile release-jeezy

build:
just build-targets komorebic komorebic-no-console komorebi komorebi-bar komorebi-gui

copy-target target:
cp .\target\release-jeezy\{{ target }}.exe $Env:USERPROFILE\.cargo\bin

copy-targets *targets:
"{{ targets }}" -split ' ' | ForEach-Object { just copy-target $_ }

copy:
just copy-targets komorebic komorebic-no-console komorebi komorebi-bar komorebi-gui

run target:
cargo +stable run --bin {{ target }} --locked
cargo +stable run --bin {{ target }} --locked --profile dev-jeezy

warn target $RUST_LOG="warn":
just run {{ target }}
Expand Down

0 comments on commit 1756983

Please sign in to comment.