Skip to content

Commit

Permalink
prepare for allowing two CLI crates to be used
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jun 30, 2020
1 parent 4e50e5e commit f558ce5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ test = false
doctest = false

[features]
default = ["fast"]
default = ["fast", "pretty-cli"]
fast = ["git-features/parallel", "git-features/fast-sha1"]
pretty-cli = ["structopt"]

[dependencies]
gitoxide-core = { version = "0.1.0", path = "gitoxide-core" }
git-features = { version = "0.1.0", path = "git-features" }
structopt = { version = "0.3.14", optional = true }
anyhow = "1.0.31"
structopt = "0.3.14"

[profile.release]
overflow-checks = false
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,22 @@ This guide documents which features are available for each of the crates provide

The top-level command-line interface.

* **fast** (default)
* **fast** _(default)_
* Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions
as well as fast, hardware accelerated hashing.
* If disabled, the binary will be visibly smaller.
* **pretty-cli** _(default)_
* Use `clap` + `structopt` to build the prettiest, best documented and most user-friendly CLI at the expense of file size.
* **small-cli** _(mutually exclusive to pretty-cli)_
* Use `argh` to produce a usable binary with decent documentation that is smallest in size.
* If `pretty-cli` is enabled as well, `small-cli` will take precedence, and you pay for building unnecessary dependencies.

### git-features

A crate to help controlling which capabilities are available from the top-level crate that uses `gitoxide`.
All feature toggles are additive.

* **parallel** (optional)
* **parallel** _(optional)_
* Use scoped threads and channels to parallelize common workloads on multiple objects. If enabled, it is used everywhere
where it makes sense.
* As caches are likely to be used and instantiated per thread, more memory will be used on top of the costs for threads.
Expand Down

0 comments on commit f558ce5

Please sign in to comment.