Skip to content

Commit

Permalink
Switch to cargo workspace
Browse files Browse the repository at this point in the history
Primary:
- Switch to cargo workspace to replace xtask, make, etc.
- Add debug symbol stripping

Misc:
- Upgrade all packages
- Replace entries iterator with "next" due to the following PR:
  rust-lang/git2-rs#854
- Remove "rustfmt.toml"

Signed-off-by: Nick Gerace <[email protected]>
  • Loading branch information
JohnFredok committed Aug 9, 2022
1 parent 9c8dc75 commit 0be1f30
Show file tree
Hide file tree
Showing 22 changed files with 130 additions and 109 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

The latest version contains all changes.
<!-- The latest version contains all changes. -->

### Added

- Debug symbol stripping for `cargo install` users (result: ~79% of the size of `4.0.1`)

### Changed

- Switched to `cargo` workspaces

### [4.0.1] - 2022-07-05

Expand Down
106 changes: 60 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 7 additions & 38 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
[package]
authors = ["Nick Gerace <[email protected]>"]
categories = ["command-line-utilities", "command-line-interface"]
description = "CLI tool to help keep track of your Git repositories."
homepage = "https://nickgerace.dev"
keywords = ["git", "cli"]
license = "Apache-2.0"
name = "gfold"
readme = "README.md"
repository = "https://github.com/nickgerace/gfold/"
[workspace]
members = ["crates/*"]
default-members = ["crates/gfold"]

edition = "2021"
version = "4.0.1"

[dependencies]
anyhow = { version = "1", features = ["backtrace"] }
argh = "0"
dirs = "4"
git2 = { version = "0", default_features = false }
log = "0"
rayon = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
termcolor = "1"
thiserror = "1"
toml = "0"

# Source: https://github.com/env-logger-rs/env_logger/blob/v0.9.0/Cargo.toml#L47
# Removed features: ["regex", "termcolor"]
env_logger = { version = "0", features = ["atty", "humantime"], default_features = false }

[profile.release]
[profile.release.package.gfold]
codegen-units = 1

# Instruct linker to optimize at the link stage.
lto = true

# There is a noticeable speed difference from level 3 to 'z' or 's'.
# We need this speed for the user experience.
opt-level = 3
strip = true

# This application should not panic often and only read from the filesystem.
[profile.release]
lto = true
panic = "abort"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
.parent()
.expect("could not get parent");

println!("Running \"cargo build --release\"...");
println!("running in {:?}: cargo build --release", &repo);
let output = Command::new("cargo")
.arg("build")
.arg("--release")
Expand Down
30 changes: 30 additions & 0 deletions crates/gfold/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
authors = ["Nick Gerace <[email protected]>"]
categories = ["command-line-utilities", "command-line-interface"]
description = "CLI tool to help keep track of your Git repositories."
homepage = "https://nickgerace.dev"
keywords = ["git", "cli"]
license = "Apache-2.0"
name = "gfold"
readme = "README.md"
repository = "https://github.com/nickgerace/gfold/"

edition = "2021"
version = "4.0.1"

[dependencies]
anyhow = { version = "1", features = ["backtrace"] }
argh = "0"
dirs = "4"
git2 = { version = "0", default_features = false }
log = "0"
rayon = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
termcolor = "1"
thiserror = "1"
toml = "0"

# Source: https://github.com/env-logger-rs/env_logger/blob/v0.9.0/Cargo.toml#L47
# Removed features: ["regex", "termcolor"]
env_logger = { version = "0", features = ["atty", "humantime"], default_features = false }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 0be1f30

Please sign in to comment.