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

zip-cli binary crate #235

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5a0bc0a
add new zip-cli crate in workspace
cosmicexplorer Aug 11, 2024
38c2ecf
demonstrate more-parameterized help text
cosmicexplorer Nov 27, 2024
0d6e434
restructure help output
cosmicexplorer Nov 28, 2024
6454f7a
add print module
cosmicexplorer Nov 28, 2024
85e12e0
save progress
cosmicexplorer Nov 28, 2024
248f14d
lots of scheming
cosmicexplorer Nov 28, 2024
8e612b5
create EntryData
cosmicexplorer Nov 28, 2024
0b102a3
use EntryData to impl compress command
cosmicexplorer Nov 28, 2024
122224b
remove unused schema trait
cosmicexplorer Nov 28, 2024
2eda9b2
add json conditional dependency
cosmicexplorer Nov 28, 2024
44a8444
save work on backends and such
cosmicexplorer Nov 28, 2024
38d1b9f
refactor schema.rs
cosmicexplorer Nov 28, 2024
7713e07
refactor transforms
cosmicexplorer Nov 28, 2024
0aa7a19
save progress
cosmicexplorer Nov 28, 2024
f58ba14
refactor "backend"
cosmicexplorer Nov 30, 2024
9e2536a
add a Resource trait but not really sure what to do with it yet
cosmicexplorer Nov 30, 2024
a23f35d
do more with Resource
cosmicexplorer Nov 30, 2024
39e5cb9
more schema development
cosmicexplorer Dec 1, 2024
ba2f42b
add json output type tests
cosmicexplorer Dec 1, 2024
243708a
test argv and json serde separately
cosmicexplorer Dec 1, 2024
ab1a65b
save progress
cosmicexplorer Dec 1, 2024
b08bf02
add Error impls
cosmicexplorer Dec 1, 2024
2eb7bb7
[UNNECESSARY] make FileOptions hashable!
cosmicexplorer Dec 1, 2024
2bf12b1
make other things hash and test them
cosmicexplorer Dec 1, 2024
b70a03d
the Compress command is now a conjunction of Resources!
cosmicexplorer Dec 1, 2024
3b8be6b
refactor argv parsing to be dyn friendly
cosmicexplorer Dec 1, 2024
0cab7e0
rearrange some stuff to prepare for dyn magic
cosmicexplorer Dec 1, 2024
f20f0c3
sketch out the command builders
cosmicexplorer Dec 1, 2024
8ca7aa0
example composed command for compress
cosmicexplorer Dec 1, 2024
3d9e660
remove unused dyn traits
cosmicexplorer Dec 1, 2024
b0cfa9d
save progress
cosmicexplorer Dec 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ authors = [
license = "MIT"
repository = "https://github.com/zip-rs/zip2.git"
keywords = ["zip", "archive", "compression"]
categories = ["compression", "filesystem", "parser-implementations"]
rust-version = "1.73.0"
description = """
Library to support the reading and writing of zip files.
Expand All @@ -23,7 +24,9 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace.dependencies]
time = { version = "0.3.1", default-features = false }
arbitrary = { version = "1.3.2", features = ["derive"] }
time = { version = "0.3.36", default-features = false }
zip = { path = ".", default-features = false }

[dependencies]
aes = { version = "0.8", optional = true }
Expand Down Expand Up @@ -53,7 +56,7 @@ lzma-rs = { version = "0.3", default-features = false, optional = true }
crossbeam-utils = "0.8.20"

[target.'cfg(fuzzing)'.dependencies]
arbitrary = { version = "1.3.2", features = ["derive"] }
arbitrary.workspace = true

[dev-dependencies]
bencher = "0.1.5"
Expand Down
73 changes: 73 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[package]
name = "zip-cli"
version = "0.0.1"
authors = [
"Danny McClanahan <[email protected]>",
]
license = "MIT"
repository = "https://github.com/zip-rs/zip2.git"
keywords = ["zip", "archive", "compression", "cli"]
categories = ["command-line-utilities", "compression", "filesystem", "development-tools::build-utils"]
rust-version = "1.74.0"
description = """
Binary for creation and manipulation of zip files.
"""
edition = "2021"

# Prevent this from interfering with workspaces
[workspace]
members = ["."]

[lib]

[[bin]]
name = "zip-cli"

cosmicexplorer marked this conversation as resolved.
Show resolved Hide resolved
[dependencies]
glob = { version = "0.3", optional = true }
regex = { version = "1", optional = true }
json = { version = "0.12", optional = true }

[dependencies.zip]
path = ".."
default-features = false

[features]
aes-crypto = ["zip/aes-crypto"]
bzip2 = ["zip/bzip2"]
chrono = ["zip/chrono"]
deflate64 = ["zip/deflate64"]
deflate = ["zip/deflate"]
deflate-flate2 = ["zip/deflate-flate2"]
deflate-zlib = ["zip/deflate-zlib"]
deflate-zlib-ng = ["zip/deflate-zlib-ng"]
deflate-zopfli = ["zip/deflate-zopfli"]
lzma = ["zip/lzma"]
time = ["zip/time"]
xz = ["zip/xz"]
zstd = ["zip/zstd"]

glob = ["dep:glob"]
rx = ["dep:regex"]
json = ["dep:json"]

default = [
"aes-crypto",
"bzip2",
"deflate64",
"deflate",
"lzma",
"time",
"xz",
"zstd",
"glob",
"rx",
"json",
]


[profile.release]
strip = true
lto = true
opt-level = 3
codegen-units = 1
42 changes: 42 additions & 0 deletions cli/clite/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "zip-clite"
version = "0.0.1"
authors = [
"Danny McClanahan <[email protected]>",
]
license = "MIT"
repository = "https://github.com/zip-rs/zip2.git"
keywords = ["zip", "archive", "compression", "cli"]
categories = ["command-line-utilities", "compression", "filesystem", "development-tools::build-utils"]
rust-version = "1.74.0"
description = """
Binary for creation and manipulation of zip files.
"""
edition = "2021"

# Prevent this from interfering with workspaces
[workspace]
members = ["."]

[[bin]]
name = "zip-clite"

[dependencies.zip-cli]
path = ".."
default-features = false
features = [
"deflate-flate2",
"deflate-zlib",
]

[features]
# These are all pure rust crates with no significant dependency tree.
rust-deps = ["zip-cli/glob", "zip-cli/rx", "zip-cli/json"]

default = []

[profile.release]
strip = true
lto = true
opt-level = "s"
cosmicexplorer marked this conversation as resolved.
Show resolved Hide resolved
codegen-units = 1
3 changes: 3 additions & 0 deletions cli/clite/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
zip_cli::driver::main();
}
Loading
Loading