Skip to content

Commit 2c32f8a

Browse files
add new zip-cli crate in workspace
- add eyre and clap - implement absurd arg parsing - add help text - add long help text - first iteration of compression - add --stdout - add large file support - make the compress command mostly work - make compress flags work better - verbose output works! - reduce size of zip-cli from 2.9M->1.3M
1 parent af33ed3 commit 2c32f8a

File tree

5 files changed

+878
-1
lines changed

5 files changed

+878
-1
lines changed

Cargo.toml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ authors = [
1010
license = "MIT"
1111
repository = "https://github.com/zip-rs/zip2.git"
1212
keywords = ["zip", "archive", "compression"]
13+
categories = ["compression", "filesystem", "parser-implementations"]
1314
rust-version = "1.73.0"
1415
description = """
1516
Library to support the reading and writing of zip files.
@@ -22,8 +23,19 @@ build = "src/build.rs"
2223
all-features = true
2324
rustdoc-args = ["--cfg", "docsrs"]
2425

26+
[workspace]
27+
members = [
28+
".",
29+
"cli",
30+
]
31+
default-members = [
32+
".",
33+
]
34+
resolver = "2"
35+
2536
[workspace.dependencies]
2637
time = { version = "0.3.36", default-features = false }
38+
zip = { path = "." }
2739

2840
[dependencies]
2941
aes = { version = "0.8.4", optional = true }
@@ -61,7 +73,7 @@ getrandom = { version = "0.2.15", features = ["js", "std"] }
6173
walkdir = "2.5.0"
6274
time = { workspace = true, features = ["formatting", "macros"] }
6375
anyhow = "1"
64-
clap = { version = "=4.4.18", features = ["derive"] }
76+
clap = { version = "4", features = ["derive"] }
6577
tempdir = "0.3.7"
6678

6779
[features]
@@ -101,3 +113,9 @@ harness = false
101113
[[bench]]
102114
name = "merge_archive"
103115
harness = false
116+
117+
# Reduce the size of the zip-cli binary.
118+
[profile.release]
119+
strip = true
120+
lto = true
121+
opt-level = "z"

cli/Cargo.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[package]
2+
name = "zip-cli"
3+
version = "0.0.0"
4+
authors = [
5+
"Danny McClanahan <dmcC2@hypnicjerk.ai>",
6+
]
7+
license = "MIT"
8+
repository = "https://github.com/zip-rs/zip2.git"
9+
keywords = ["zip", "archive", "compression", "cli"]
10+
categories = ["command-line-utilities", "compression", "filesystem", "development-tools::build-utils"]
11+
rust-version = "1.73.0"
12+
description = """
13+
Binary for creation and manipulation of zip files.
14+
"""
15+
edition = "2021"
16+
17+
[[bin]]
18+
name = "zip-cli"
19+
20+
[dependencies]
21+
zip.workspace = true
22+
23+
clap = { version = "4.5.15", features = ["derive"] }
24+
eyre = "0.6"

0 commit comments

Comments
 (0)