Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate shell completions and man page for b3sum at build time #391

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# https://github.com/rust-lang/libs-team/issues/72.
# This test target is here so that we notice if we accidentally bump
# the MSRV, but it's not a promise that we won't bump it.
"1.66.1",
"1.72.0",
]

steps:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ license = "CC0-1.0 OR Apache-2.0"
documentation = "https://docs.rs/blake3"
readme = "README.md"
edition = "2021"
rust-version = "1.72.0"

[features]
default = ["std"]
Expand Down
134 changes: 84 additions & 50 deletions b3sum/Cargo.lock

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

21 changes: 14 additions & 7 deletions b3sum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@ repository = "https://github.com/BLAKE3-team/BLAKE3"
license = "CC0-1.0 OR Apache-2.0"
readme = "README.md"
edition = "2021"
rust-version = "1.74.1"

[features]
neon = ["blake3/neon"]
prefer_intrinsics = ["blake3/prefer_intrinsics"]
pure = ["blake3/pure"]

[dependencies]
anyhow = "1.0.25"
anyhow = "1.0.82"
blake3 = { version = "1", path = "..", features = ["mmap", "rayon"] }
clap = { version = "4.0.8", features = ["derive", "wrap_help"] }
hex = "0.4.0"
rayon = "1.2.1"
wild = "2.0.3"
clap = { version = "4.5.4", features = ["derive", "wrap_help"] }
hex = "0.4.3"
rayon = "1.10.0"
wild = "2.2.1"

[dev-dependencies]
duct = "0.13.3"
tempfile = "3.1.0"
duct = "0.13.7"
tempfile = "3.10.1"

[build-dependencies]
blake3 = { version = "1", path = ".." }
clap = { version = "4.5.4", features = ["derive"] }
clap_complete = "4.5.2"
clap_mangen = "0.2.20"
4 changes: 4 additions & 0 deletions b3sum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ On Linux for example, Cargo will put the compiled binary in
If you want to install directly from this directory, you can run `cargo
install --path .`. Or you can just build with `cargo build --release`,
which puts the binary at `./target/release/b3sum`.

Also, shell completions and a man page are generated at build time. The
output directory can be found by running `find ./target -path
'*/b3sum-*/out' -type d`.