Skip to content

Commit 3c1e585

Browse files
committed
release: 0.12.2
2 parents 31fa8d8 + 14c80fd commit 3c1e585

File tree

6 files changed

+73
-102
lines changed

6 files changed

+73
-102
lines changed

CREDITS.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
11
# Project Dependencies
22
Package: channelz
3-
Version: 0.12.1
3+
Version: 0.12.2
44
Target: x86_64-unknown-linux-gnu
5-
Generated: 2025-09-19 02:54:18 UTC
5+
Generated: 2025-10-31 01:17:44 UTC
66

77
| Package | Version | Author(s) | License |
88
| ---- | ---- | ---- | ---- |
99
| [ahash](https://github.com/tkaitchuck/ahash) | 0.8.12 | [Tom Kaitchuck](mailto:tom.kaitchuck@gmail.com) | MIT OR Apache-2.0 |
1010
| [alloc-no-stdlib](https://github.com/dropbox/rust-alloc-no-stdlib) | 2.0.4 | [Daniel Reiter Horn](mailto:danielrh@dropbox.com) | BSD-3-Clause |
1111
| [alloc-stdlib](https://github.com/dropbox/rust-alloc-no-stdlib) | 0.2.2 | [Daniel Reiter Horn](mailto:danielrh@dropbox.com) | BSD-3-Clause |
12-
| [**argyle**](https://github.com/Blobfolio/argyle) | 0.13.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
13-
| [autocfg](https://github.com/cuviper/autocfg) ⚒️ | 1.5.0 | [Josh Stone](mailto:cuviper@gmail.com) | Apache-2.0 OR MIT |
14-
| [bitflags](https://github.com/bitflags/bitflags) | 2.9.4 | The Rust Project Developers | MIT OR Apache-2.0 |
12+
| [**argyle**](https://github.com/Blobfolio/argyle) | 0.14.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
13+
| [bitflags](https://github.com/bitflags/bitflags) | 2.10.0 | The Rust Project Developers | MIT OR Apache-2.0 |
1514
| [**brotli**](https://github.com/dropbox/rust-brotli) | 8.0.2 | [Daniel Reiter Horn](mailto:danielrh@dropbox.com) and The Brotli Authors | BSD-3-Clause AND MIT |
1615
| [brotli-decompressor](https://github.com/dropbox/rust-brotli-decompressor) | 5.0.0 | [Daniel Reiter Horn](mailto:danielrh@dropbox.com) and The Brotli Authors | BSD-3-Clause OR MIT |
17-
| [cc](https://github.com/rust-lang/cc-rs) ⚒️ | 1.2.37 | [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 |
18-
| [cfg-if](https://github.com/rust-lang/cfg-if) | 1.0.3 | [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 |
16+
| [cc](https://github.com/rust-lang/cc-rs) ⚒️ | 1.2.43 | [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 |
17+
| [cfg-if](https://github.com/rust-lang/cfg-if) | 1.0.4 | [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 |
1918
| [**dactyl**](https://github.com/Blobfolio/dactyl) | 0.13.1 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
20-
| [**dowser**](https://github.com/Blobfolio/dowser) | 0.17.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
19+
| [**dowser**](https://github.com/Blobfolio/dowser) | 0.18.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
2120
| [fastrand](https://github.com/smol-rs/fastrand) | 2.3.0 | [Stjepan Glavina](mailto:stjepang@gmail.com) | Apache-2.0 OR MIT |
2221
| [filetime](https://github.com/alexcrichton/filetime) | 0.2.26 | [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 |
23-
| [find-msvc-tools](https://github.com/rust-lang/cc-rs) ⚒️ | 0.1.1 | | MIT OR Apache-2.0 |
22+
| [find-msvc-tools](https://github.com/rust-lang/cc-rs) ⚒️ | 0.1.4 | | MIT OR Apache-2.0 |
2423
| [**flume**](https://github.com/zesterer/flume) | 0.11.1 | [Joshua Barretto](mailto:joshua.s.barretto@gmail.com) | Apache-2.0 OR MIT |
25-
| [fyi_ansi](https://github.com/Blobfolio/fyi) | 2.2.1 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
26-
| [**fyi_msg**](https://github.com/Blobfolio/fyi) | 2.4.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
27-
| [getrandom](https://github.com/rust-random/getrandom) | 0.3.3 | The Rand Project Developers | MIT OR Apache-2.0 |
28-
| [libc](https://github.com/rust-lang/libc) | 0.2.175 | The Rust Project Developers | MIT OR Apache-2.0 |
24+
| [fyi_ansi](https://github.com/Blobfolio/fyi) | 2.2.2 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
25+
| [**fyi_msg**](https://github.com/Blobfolio/fyi) | 2.4.1 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
26+
| [getrandom](https://github.com/rust-random/getrandom) | 0.3.4 | The Rand Project Developers | MIT OR Apache-2.0 |
27+
| [libc](https://github.com/rust-lang/libc) | 0.2.177 | The Rust Project Developers | MIT OR Apache-2.0 |
2928
| [libdeflate-sys](https://github.com/adamkewley/libdeflater) | 1.24.0 | [Adam Kewley](mailto:contact@adamkewley.com) | Apache-2.0 |
3029
| [**libdeflater**](https://github.com/adamkewley/libdeflater) | 1.24.0 | [Adam Kewley](mailto:contact@adamkewley.com) | Apache-2.0 |
3130
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | 0.11.0 | [Dan Gohman](mailto:dev@sunfishcode.online) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
32-
| [lock_api](https://github.com/Amanieu/parking_lot) | 0.4.13 | [Amanieu d'Antras](mailto:amanieu@gmail.com) | MIT OR Apache-2.0 |
31+
| [lock_api](https://github.com/Amanieu/parking_lot) | 0.4.14 | [Amanieu d'Antras](mailto:amanieu@gmail.com) | MIT OR Apache-2.0 |
3332
| [once_cell](https://github.com/matklad/once_cell) | 1.21.3 | [Aleksey Kladov](mailto:aleksey.kladov@gmail.com) | MIT OR Apache-2.0 |
3433
| [rustix](https://github.com/bytecodealliance/rustix) | 1.1.2 | [Dan Gohman](mailto:dev@sunfishcode.online) and [Jakub Konka](mailto:kubkon@jakubkonka.com) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
3534
| [scopeguard](https://github.com/bluss/scopeguard) | 1.2.0 | bluss | MIT OR Apache-2.0 |
3635
| [shlex](https://github.com/comex/rust-shlex) ⚒️ | 1.3.0 | [comex](mailto:comexk@gmail.com), [Fenhl](mailto:fenhl@fenhl.net), [Adrian Taylor](mailto:adetaylor@chromium.org), [Alex Touchet](mailto:alextouchet@outlook.com), [Daniel Parks](mailto:dp+git@oxidized.org), and [Garrett Berg](mailto:googberg@gmail.com) | MIT OR Apache-2.0 |
3736
| [signal-hook](https://github.com/vorner/signal-hook) | 0.3.18 | [Michal 'vorner' Vaner](mailto:vorner@vorner.cz) and [Thomas Himmelstoss](mailto:thimm@posteo.de) | Apache-2.0 OR MIT |
3837
| [signal-hook-registry](https://github.com/vorner/signal-hook) | 1.4.6 | [Michal 'vorner' Vaner](mailto:vorner@vorner.cz) and [Masaki Hara](mailto:ackie.h.gmai@gmail.com) | Apache-2.0 OR MIT |
3938
| [spin](https://github.com/mvdnes/spin-rs.git) | 0.9.8 | [Mathijs van de Nes](mailto:git@mathijs.vd-nes.nl), [John Ericson](mailto:git@johnericson.me), and [Joshua Barretto](mailto:joshua.s.barretto@gmail.com) | MIT |
40-
| [tempfile](https://github.com/Stebalien/tempfile) | 3.22.0 | [Steven Allen](mailto:steven@stebalien.com), The Rust Project Developers, [Ashley Mannix](mailto:ashleymannix@live.com.au), and [Jason White](mailto:me@jasonwhite.io) | MIT OR Apache-2.0 |
39+
| [tempfile](https://github.com/Stebalien/tempfile) | 3.23.0 | [Steven Allen](mailto:steven@stebalien.com), The Rust Project Developers, [Ashley Mannix](mailto:ashleymannix@live.com.au), and [Jason White](mailto:me@jasonwhite.io) | MIT OR Apache-2.0 |
4140
| [terminal_size](https://github.com/eminence/terminal-size) | 0.4.3 | [Andrew Chin](mailto:achin@eminence32.net) | MIT OR Apache-2.0 |
42-
| [unicode-width](https://github.com/unicode-rs/unicode-width) | 0.2.1 | [kwantam](mailto:kwantam@gmail.com) and [Manish Goregaokar](mailto:manishsmail@gmail.com) | MIT OR Apache-2.0 |
41+
| [unicode-width](https://github.com/unicode-rs/unicode-width) | 0.2.2 | [kwantam](mailto:kwantam@gmail.com) and [Manish Goregaokar](mailto:manishsmail@gmail.com) | MIT OR Apache-2.0 |
4342
| [version_check](https://github.com/SergioBenitez/version_check) ⚒️ | 0.9.5 | [Sergio Benitez](mailto:sb@sergio.bz) | MIT OR Apache-2.0 |
4443
| [**write_atomic**](https://github.com/Blobfolio/write_atomic) | 0.7.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
4544
| [zerocopy](https://github.com/google/zerocopy) | 0.8.27 | [Joshua Liebow-Feeser](mailto:joshlf@google.com) and [Jack Wrenn](mailto:jswrenn@amazon.com) | BSD-2-Clause OR Apache-2.0 OR MIT |

Cargo.toml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "channelz"
3-
version = "0.12.1"
3+
version = "0.12.2"
44
license = "WTFPL"
55
authors = ["Josh Stoik <josh@blobfolio.com>"]
66
edition = "2024"
@@ -92,17 +92,14 @@ lines = [
9292
]
9393

9494
[build-dependencies]
95-
argyle = "0.13.*"
95+
argyle = "0.14.*"
9696

9797
[dependencies]
98+
argyle = "0.14.*"
9899
dactyl = "0.13.*"
99-
dowser = "0.17.*"
100+
dowser = "0.18.*"
100101
write_atomic = "0.7.*"
101102

102-
[dependencies.argyle]
103-
version = "0.13.*"
104-
features = [ "try_paths" ]
105-
106103
[dependencies.brotli]
107104
version = "=8.0.2"
108105
default-features = false

build.rs

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,11 @@
22
# `ChannelZ`
33
*/
44

5-
use argyle::{
6-
FlagsBuilder,
7-
KeyWordsBuilder,
8-
};
9-
use std::path::PathBuf;
10-
11-
12-
13-
/// # Pre-Compute Arguments and Extensions.
14-
///
15-
/// Because we know all of the target extensions in advance, we can store them
16-
/// as primitives for faster runtime comparison (when crawling paths).
17-
///
18-
/// There are a few other, longer extensions that aren't worth optimizing in
19-
/// this way. They're just dealt with inline in `ext.rs`.
5+
/// # Build Settings Flags.
206
fn main() {
217
println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION");
228

23-
// CLI Arguments.
24-
write_cli();
25-
26-
// Flags.
27-
write_flags();
28-
}
29-
30-
/// # Output Path.
31-
///
32-
/// Append the sub-path to OUT_DIR and return it.
33-
fn out_path(stub: &str) -> PathBuf {
34-
std::fs::canonicalize(std::env::var("OUT_DIR").expect("Missing OUT_DIR."))
35-
.expect("Missing OUT_DIR.")
36-
.join(stub)
37-
}
38-
39-
/// # Write CLI Arguments.
40-
fn write_cli() {
41-
let mut builder = KeyWordsBuilder::default();
42-
builder.push_keys([
43-
"--clean", "--clean-only",
44-
"--force",
45-
"--no-br",
46-
"--no-gz",
47-
"-h", "--help",
48-
"-p", "--progress",
49-
"-V", "--version",
50-
]);
51-
builder.push_keys_with_values(["-l", "--list"]);
52-
builder.save(out_path("argyle.rs"));
53-
}
54-
55-
/// # Write Flags.
56-
fn write_flags() {
57-
FlagsBuilder::new("Flags")
9+
argyle::FlagsBuilder::new("Flags")
5810
.private()
5911
.with_flag("Brotli", None)
6012
.with_flag("Gzip", None)
@@ -64,3 +16,12 @@ fn write_flags() {
6416
.with_flag("Force", Some("# Crunch All Files.\n\nIgnore the built-in extension times and crunch all the files found."))
6517
.save(out_path("flags.rs"));
6618
}
19+
20+
/// # Output Path.
21+
///
22+
/// Append the sub-path to OUT_DIR and return it.
23+
fn out_path(stub: &str) -> std::path::PathBuf {
24+
std::fs::canonicalize(std::env::var("OUT_DIR").expect("Missing OUT_DIR."))
25+
.expect("Missing OUT_DIR.")
26+
.join(stub)
27+
}

release/man/channelz.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.TH "CHANNELZ" "1" "September 2025" "channelz v0.12.1" "User Commands"
1+
.TH "CHANNELZ" "1" "October 2025" "channelz v0.12.2" "User Commands"
22
.SH NAME
3-
CHANNELZ \- Manual page for channelz v0.12.1.
3+
CHANNELZ \- Manual page for channelz v0.12.2.
44
.SH DESCRIPTION
55
Fast, multi\-threaded static Gzip/Brotli encoding tool for the CLI.
66
.SS USAGE:

src/enc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Encoder {
5353
/// # New Instance.
5454
///
5555
/// Return a new re-usable encoder instance for the given format(s).
56-
pub(super) fn new(kinds: Flags) -> Self {
56+
pub(super) const fn new(kinds: Flags) -> Self {
5757
Self {
5858
src: Vec::new(),
5959
dst_buf: Vec::new(),

src/main.rs

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
clippy::format_push_string,
2525
clippy::get_unwrap,
2626
clippy::impl_trait_in_params,
27+
clippy::implicit_clone,
2728
clippy::lossy_float_literal,
2829
clippy::missing_assert_message,
2930
clippy::missing_docs_in_private_items,
@@ -33,7 +34,6 @@
3334
clippy::rest_pat_in_fully_bound_structs,
3435
clippy::semicolon_inside_block,
3536
clippy::str_to_string,
36-
clippy::string_to_string,
3737
clippy::todo,
3838
clippy::undocumented_unsafe_blocks,
3939
clippy::unneeded_field_pattern,
@@ -67,7 +67,6 @@ use abacus::{
6767
EncoderTotals,
6868
ThreadTotals,
6969
};
70-
use argyle::Argument;
7170
use flume::Receiver;
7271
use dactyl::NiceU64;
7372
use dowser::Dowser;
@@ -121,37 +120,50 @@ fn main() -> ExitCode {
121120
#[inline]
122121
/// # Actual Main.
123122
fn main__() -> Result<(), ChannelZError> {
124-
let args = argyle::args()
125-
.with_keywords(include!(concat!(env!("OUT_DIR"), "/argyle.rs")));
123+
argyle::argue! {
124+
Clean "--clean",
125+
CleanOnly "--clean-only",
126+
Force "--force",
127+
NoBr "--no-br",
128+
NoGz "--no-gz",
129+
Progress "-p" "--progress",
130+
Help "-h" "--help",
131+
Version "-V" "--version",
132+
133+
@options
134+
List "-l" "--list",
135+
136+
@catchall-paths Path,
137+
}
126138

139+
// Parse CLI arguments.
127140
let mut kinds = Flags::All;
128141
let mut paths = Dowser::default();
129142
let mut progress = false;
130-
for arg in args {
143+
for arg in Argument::args_os() {
131144
match arg {
132-
Argument::Key("--clean") => { kinds.set(Flags::Clean); },
133-
Argument::Key("--clean-only") => { kinds.set(Flags::CleanOnly); },
134-
Argument::Key("--force") => { kinds.set(Flags::Force); },
135-
Argument::Key("--no-br") => { kinds.unset(Flags::Brotli); },
136-
Argument::Key("--no-gz") => { kinds.unset(Flags::Gzip); },
137-
Argument::Key("-p" | "--progress") => { progress = true; },
138-
139-
Argument::Key("-h" | "--help") => return Err(ChannelZError::PrintHelp),
140-
Argument::Key("-V" | "--version") => return Err(ChannelZError::PrintVersion),
141-
142-
Argument::KeyWithValue("-l" | "--list", s) => {
143-
paths.push_paths_from_file(s).map_err(|_| ChannelZError::ListFile)?;
144-
},
145+
Argument::Clean => { kinds.set(Flags::Clean); },
146+
Argument::CleanOnly => { kinds.set(Flags::CleanOnly); },
147+
Argument::Force => { kinds.set(Flags::Force); },
148+
Argument::NoBr => { kinds.unset(Flags::Brotli); },
149+
Argument::NoGz => { kinds.unset(Flags::Gzip); },
150+
Argument::Progress => { progress = true; },
151+
152+
Argument::Help => return Err(ChannelZError::PrintHelp),
153+
Argument::Version => return Err(ChannelZError::PrintVersion),
154+
155+
Argument::List(s) =>
156+
if s == "-" { paths.push_paths_from_stdin(); }
157+
else {
158+
paths.push_paths_from_file(s).map_err(|_| ChannelZError::ListFile)?;
159+
},
145160

146161
// Assume paths.
147162
Argument::Path(s) => { paths = paths.with_path(s); },
148163

149164
// Mistakes?
150-
Argument::Other(s) => return Err(ChannelZError::InvalidCli(s)),
151-
Argument::InvalidUtf8(s) => return Err(ChannelZError::InvalidCli(s.to_string_lossy().into_owned())),
152-
153-
// Nothing else is expected.
154-
_ => {},
165+
Argument::Other(s) => return Err(ChannelZError::InvalidCli(s)),
166+
Argument::OtherOs(s) => return Err(ChannelZError::InvalidCli(s.to_string_lossy().into_owned())),
155167
}
156168
}
157169

@@ -195,8 +207,10 @@ fn main__() -> Result<(), ChannelZError> {
195207
// Set up the worker threads.
196208
let mut workers = Vec::with_capacity(threads.get());
197209
for _ in 0..threads.get() {
198-
workers.push(s.spawn(#[inline(always)] || crunch(&rx, kinds, progress.as_ref())));
210+
let rx2 = rx.clone();
211+
workers.push(s.spawn(#[inline(always)] || crunch(rx2, kinds, progress.as_ref())));
199212
}
213+
drop(rx);
200214

201215
// Push all the files to it, then drop the sender to disconnect.
202216
for path in &paths {
@@ -212,7 +226,6 @@ fn main__() -> Result<(), ChannelZError> {
212226
)
213227
.map_err(|_| ChannelZError::Jobserver)
214228
})?;
215-
drop(rx);
216229

217230
// Summarize?
218231
if let Some(progress) = progress {
@@ -268,13 +281,14 @@ fn clean(paths: Dowser, summary: bool, kinds: Flags) {
268281
}
269282
}
270283

284+
#[expect(clippy::needless_pass_by_value, reason = "For drop.")]
271285
#[inline(never)]
272286
/// # Worker Callback.
273287
///
274288
/// This is the worker callback for crunching. It listens for "new" file paths
275289
/// and crunches them — and maybe updates the progress bar, etc. — then quits
276290
/// as soon as the work has dried up.
277-
fn crunch(rx: &Receiver::<&Path>, kinds: Flags, progress: Option<&Progless>) -> ThreadTotals {
291+
fn crunch(rx: Receiver::<&Path>, kinds: Flags, progress: Option<&Progless>) -> ThreadTotals {
278292
let mut enc = enc::Encoder::new(kinds);
279293
let mut len = ThreadTotals::new();
280294

0 commit comments

Comments
 (0)