rs-histver-0.1.0 is not a library.
Visit the last successful build:
rs-histver-0.4.2
rs-histver
A CLI tool to query Rust historical release versions with local redb cache. Supports stable, beta, and nightly channels.
Installation
Or build from source:
Quick Start
# Sync stable releases to local cache
# Sync full stable history (all releases)
# Sync nightly releases from the last 30 days
# Sync beta releases from the last 14 days
# List cached releases
# List nightly releases
# Search releases
# Show cache statistics
Commands
Global Options
| Option | Description |
|---|---|
-C, --config <PATH> |
Path to config file |
-h, --help |
Show help |
-V, --version |
Show version |
sync — Sync release data
Fetch release information from remote and cache to local redb database.
| Option | Default | Description |
|---|---|---|
-c, --channel <CHANNEL> |
stable |
Channel: stable / beta / nightly |
--full |
— | Use RELEASES.md data source (stable only, full history) |
-d, --days <DAYS> |
30 |
Probe recent N days of history (beta/nightly only) |
Data sources:
| Channel | Default source | --full source |
|---|---|---|
| stable | GitHub Releases API | RELEASES.md (full history) |
| beta | dist/YYYY-MM-DD/channel-rust-beta.toml date probing |
— |
| nightly | dist/YYYY-MM-DD/channel-rust-nightly.toml date probing |
— |
list — List cached releases
| Option | Default | Description |
|---|---|---|
-n, --limit <N> |
20 |
Maximum entries to display |
-c, --channel <CHANNEL> |
all | Filter by channel |
search — Search releases
Fuzzy match by version number or date.
| Argument/Option | Description |
|---|---|
<KEYWORD> |
Search keyword, e.g. 1.75 or 2024-06 |
-c, --channel <CHANNEL> |
Filter by channel |
info — Cache statistics
| Option | Description |
|---|---|
-c, --channel <CHANNEL> |
Filter by channel |
Configuration
The tool searches for config.toml in the following order:
- Path specified by
-CCLI argument config.tomlin the current working directoryconfig.tomlin the executable's directory- Default configuration if none found
Configuration Options
[]
# Database file path
# - Empty: use system default path
# - Relative: based on executable directory
# - Absolute: used as-is
= ""
# Database table name
= "rust_releases"
[]
# HTTP request timeout (seconds)
= 15
# Max concurrent connections (for beta/nightly probing)
= 10
# Request User-Agent
= "rs-histver/0.1"
Default Database Path
| OS | Path |
|---|---|
| Windows | %LOCALAPPDATA%\rs-histver\releases.redb |
| Linux | ~/.local/share/rs-histver/releases.redb |
| macOS | ~/Library/Application Support/rs-histver/releases.redb |
Project Structure
src/
├── main.rs # Entry point
├── cli.rs # CLI module root
│ └── cli/
│ └── types.rs # Channel enum, Cli, Commands definitions
├── domain.rs # Domain module root
│ └── domain/
│ └── release.rs # RustRelease data model
├── infra.rs # Infrastructure module root
│ ├── infra/
│ │ ├── config.rs # Configuration loading (Config, DatabaseConfig, NetworkConfig)
│ │ ├── database.rs # Database access layer (Db, redb)
│ │ └── fetcher.rs # ReleaseFetcher trait + create_fetcher factory
│ └── infra/fetcher/
│ ├── http.rs # Shared HTTP client & TOML utilities
│ ├── stable.rs # StableFetcher (GitHub API / RELEASES.md)
│ ├── beta.rs # BetaFetcher (channel TOML probing)
│ └── nightly.rs # NightlyFetcher (channel TOML probing)
└── app.rs # Application module root
└── app/
├── handler.rs # App struct + business logic
└── display.rs # Table formatting utilities
Design Patterns
- Strategy Pattern:
ReleaseFetchertrait — each channel implements its own fetch logic - Factory Method:
create_fetcher()— creates the appropriate fetcher based on channel name
API Documentation
Full API documentation is available on docs.rs after publishing, or generate locally:
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.