Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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 @@ -115,7 +115,7 @@ jobs:
- name: Install Rust MSRV toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: "1.87"
toolchain: "1.91"

- name: Install Linux build deps
run: |
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ cargo test --test integration_test test_intercept_slope_match
```
src/
main.rs — Entry point, dispatches subcommands
cli.rs — CLI argument parsing (clap derive, subcommand structure)
cli.rs — CLI argument parsing (usage-rs derive, subcommand structure)
config.rs — YAML configuration loading (serde), nested tool configs
io.rs — Shared I/O utilities (gzip-transparent file reading)
gtf.rs — GTF annotation file parser (with configurable attribute extraction)
Expand Down Expand Up @@ -243,7 +243,7 @@ To prepare a release:

| Crate | Purpose |
| ---------------------- | ------------------------------------- |
| `clap` v4 | CLI argument parsing (derive) |
| `usage-rs` 6.1.1 | CLI argument parsing (derive; experimental) |
| `rust-htslib` | BAM file I/O (statically linked) |
| `plotters` | Chart generation (PNG + SVG) |
| `serde` | YAML config deserialization |
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# RustQC Changelog

## Unreleased

### Other changes

- Replace clap with [usage-rs](https://usage.jdx.dev/rust/) 6.1.1 for CLI parsing. Flags, shorts, env vars, and defaults are unchanged; help text is rendered by usage rather than clap's template. MSRV is 1.91 (usage-rs's requirement).

## [Version 0.2.1](https://github.com/seqeralabs/RustQC/releases/tag/v0.2.1) - 2026-04-09

### Bug fixes
Expand Down
23 changes: 22 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,35 @@ To run all hooks manually:
prek run --all-files
```

## Completions, manpages, and CLI docs

The CLI is declared with [usage-rs](https://usage.jdx.dev/rust/) (pinned to
6.1.1). The binary prints its portable spec, and [usage-cli](https://usage.jdx.dev/)
at the same version turns that spec into completions, manpages, and markdown:

```bash
# Dump the spec (also available in-process as `Cli::to_kdl()`)
cargo run --quiet -- __usage_spec__ > rustqc.usage.kdl

# Generate artifacts with usage-cli 6.1.1
usage g markdown -f rustqc.usage.kdl --out-dir docs
usage g manpage -f rustqc.usage.kdl > rustqc.1
usage g completion bash rustqc --file rustqc.usage.kdl
```

Install `usage-cli` from the same release as the `usage-rs` crate so the KDL
round-trips. Completions are also served at runtime: with the `completions`
feature, `rustqc` answers hidden `__complete_word__` requests from generated
shell scripts (`Cli::completion_script`).

## Project structure

RustQC is a **binary crate** with a nested module structure. All top-level modules are declared in `main.rs` (no `lib.rs`).

```
src/
main.rs Entry point, dispatches subcommands
cli.rs CLI argument parsing (clap derive)
cli.rs CLI argument parsing (usage-rs derive)
config.rs YAML configuration loading (serde)
io.rs Shared I/O utilities (gzip-transparent file reading)
gtf.rs GTF annotation file parser
Expand Down
Loading
Loading