https://github.com/resq-software/crates
A comprehensive Rust-based CLI and TUI toolset for the ResQ autonomous drone platform. Provides unified developer and operations utilities including audit, secrets scanning, deployment orchestration, health diagnostics, log aggregation, and performance profiling.
https://github.com/resq-software/crates
automation cli-tool developer-tools devops monitoring rust tui workspace
Last synced: about 2 months ago
JSON representation
A comprehensive Rust-based CLI and TUI toolset for the ResQ autonomous drone platform. Provides unified developer and operations utilities including audit, secrets scanning, deployment orchestration, health diagnostics, log aggregation, and performance profiling.
- Host: GitHub
- URL: https://github.com/resq-software/crates
- Owner: resq-software
- Created: 2026-03-11T07:23:22.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-04-02T16:06:18.000Z (2 months ago)
- Last Synced: 2026-04-03T02:26:43.593Z (2 months ago)
- Topics: automation, cli-tool, developer-tools, devops, monitoring, rust, tui, workspace
- Language: Rust
- Homepage: https://crates.io/users/resq-sw
- Size: 378 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# ResQ Crates
[](https://github.com/resq-software/crates/actions)
[](https://crates.io/crates/resq-dsa)
[](https://crates.io/crates/resq-cli)
[](https://crates.io/crates/resq-tui)
[](LICENSE)
> A comprehensive Rust CLI/TUI toolset and DSA library for the ResQ autonomous drone platform.
## Packages
| Crate | Description | crates.io |
| :--- | :--- | :--- |
| [`resq-dsa`](crates/resq-dsa/) | Data structures and algorithms -- zero dependencies | [](https://crates.io/crates/resq-dsa) |
| [`resq-cli`](crates/cli/) | Unified CLI entry point (`resq` binary) | [](https://crates.io/crates/resq-cli) |
| [`resq-tui`](crates/resq-tui/) | Shared Ratatui component library for all TUI tools | [](https://crates.io/crates/resq-tui) |
| [`resq-health`](crates/health-checker/) | Service health monitoring dashboard | [](https://crates.io/crates/resq-health) |
| [`resq-deploy`](crates/deploy-cli/) | Kubernetes and Docker Compose deployment TUI | [](https://crates.io/crates/resq-deploy) |
| [`resq-logs`](crates/log-viewer/) | Log aggregator and stream viewer | [](https://crates.io/crates/resq-logs) |
| [`resq-perf`](crates/perf-monitor/) | Performance monitoring dashboard | [](https://crates.io/crates/resq-perf) |
| [`resq-flame`](crates/flame-graph/) | CPU profiler and flame graph generator | [](https://crates.io/crates/resq-flame) |
| [`resq-bin`](crates/bin-explorer/) | Machine code and binary analyzer | [](https://crates.io/crates/resq-bin) |
| [`resq-clean`](crates/cleanup/) | Interactive workspace cleaner | [](https://crates.io/crates/resq-clean) |
---
## resq-dsa
Production-grade data structures and algorithms with **zero external dependencies**. Supports `no_std` environments with the `alloc` crate.
### Installation
```sh
cargo add resq-dsa
```
### Features
| Feature | Default | Description |
| :--- | :--- | :--- |
| `std` | Yes | Enables standard library support |
For `no_std` environments, disable default features:
```toml
[dependencies]
resq-dsa = { version = "0.1", default-features = false }
```
The crate uses `alloc` internally, so a global allocator is required even in `no_std` mode.
### Bloom Filter
Space-efficient probabilistic set membership. False positives are possible; false negatives are not.
```rust
use resq_dsa::bloom::BloomFilter;
// Create a filter for ~1000 items with 1% false positive rate
let mut bf = BloomFilter::new(1000, 0.01);
// Add items
bf.add("drone-001");
bf.add("drone-002");
// Check membership
assert!(bf.has("drone-001")); // definitely added
assert!(!bf.has("drone-999")); // definitely NOT added
```
### Count-Min Sketch
Space-efficient probabilistic frequency estimation. May overcount but never undercounts.
```rust
use resq_dsa::count_min::CountMinSketch;
// Create a sketch with epsilon=0.01, delta=0.01 error bounds
let mut cms = CountMinSketch::new(0.01, 0.01);
// Increment frequency counts
cms.increment("sensor-a", 5);
cms.increment("sensor-b", 1);
cms.increment("sensor-a", 3);
// Estimate frequency
assert!(cms.estimate("sensor-a") >= 8);
```
### Graph
Weighted directed graph with BFS traversal, Dijkstra's shortest path, and A* pathfinding.
```rust
use resq_dsa::graph::Graph;
let mut g = Graph::<&str>::new();
g.add_edge("base", "waypoint-1", 100);
g.add_edge("waypoint-1", "target", 50);
g.add_edge("base", "target", 200);
// BFS traversal (unweighted)
let visited = g.bfs(&"base");
assert!(visited.contains(&"target"));
// Dijkstra's shortest path
let (path, cost) = g.dijkstra(&"base", &"target").unwrap();
assert_eq!(path, vec!["base", "waypoint-1", "target"]);
assert_eq!(cost, 150);
// A* with heuristic
let (path, cost) = g.astar(&"base", &"target", |_, _| 0).unwrap();
assert_eq!(cost, 150);
```
### Bounded Heap
A bounded max-heap for tracking the K smallest entries (K-nearest neighbors).
```rust
use resq_dsa::heap::BoundedHeap;
// Keep the 3 nearest neighbors, using distance function
let mut heap = BoundedHeap::new(3, |item: &(i32, i32)| {
((item.0 * item.0 + item.1 * item.1) as u64)
});
heap.insert((1, 2));
heap.insert((10, 10));
heap.insert((0, 1));
heap.insert((3, 3)); // evicts (10, 10) since heap is full
let sorted = heap.to_sorted();
assert_eq!(sorted.len(), 3);
```
### Trie
Prefix tree for efficient string storage, exact search, and autocomplete.
```rust
use resq_dsa::trie::Trie;
let mut t = Trie::new();
t.insert("drone");
t.insert("drone-001");
t.insert("drone-002");
t.insert("deploy");
// Exact search
assert!(t.search("drone"));
assert!(!t.search("dro"));
// Prefix-based autocomplete
let results = t.starts_with("drone-");
assert_eq!(results, vec!["drone-001", "drone-002"]);
```
### Rabin-Karp
Rolling-hash string pattern matching. Returns all starting indices of pattern occurrences.
```rust
use resq_dsa::trie::rabin_karp;
let indices = rabin_karp("the drone flew over the base", "the");
assert_eq!(indices, vec![0, 23]);
```
---
## CLI Tools
The workspace includes a suite of developer tools for the ResQ platform, all sharing a common TUI foundation via `resq-tui`.
| Command | Tool | Description |
| :--- | :--- | :--- |
| `resq audit` | resq-cli | Security audit (OSV/dependency scanning) |
| `resq health` | resq-health | Service health monitoring dashboard |
| `resq deploy` | resq-deploy | Kubernetes/Docker Compose deployment TUI |
| `resq logs` | resq-logs | Aggregate and stream service logs |
| `resq perf` | resq-perf | Real-time performance metrics |
| `resq flame` | resq-flame | CPU profiling and flame graph generation |
| `resq asm` | bin-explorer | Binary/machine code analysis |
| `resq clean` | resq-clean | Interactive workspace cleaner |
| `resq copyright` | resq-cli | Apache-2.0 license header enforcement |
### Quick Start
```sh
cargo install resq-cli
resq help
```
---
## Development
### Prerequisites
- **Rust:** Stable toolchain via `rustup` (pinned in `rust-toolchain.toml`).
- **Nix (optional):** For reproducible development environments, use `nix develop`.
### Build
```sh
git clone https://github.com/resq-software/crates.git
cd crates
cargo build --release --workspace
```
### Test
```sh
# Run all tests
cargo test --workspace
# Run only resq-dsa tests (including ignored complexity tests)
cargo test -p resq-dsa -- --include-ignored
```
### Lint
```sh
cargo clippy --workspace -- -D warnings
cargo fmt --all --check
```
### Cargo Aliases
| Alias | Description |
| :--- | :--- |
| `cargo resq` | Run the ResQ CLI |
| `cargo health` | Launch health monitor |
| `cargo logs` | Launch log viewer |
| `cargo perf` | Launch performance dashboard |
| `cargo deploy` | Launch deployment TUI |
| `cargo flame` | Launch flame graph profiler |
| `cargo bin` | Launch binary explorer |
| `cargo cleanup` | Launch workspace cleaner |
| `cargo check-all` | Fastest correctness check |
---
## Contributing
We follow [Conventional Commits](https://www.conventionalcommits.org/).
1. **Branch:** Use `feat/`, `fix/`, or `refactor/` prefixes.
2. **Quality:** Run `cargo clippy --workspace -- -D warnings` before submitting.
3. **Tests:** All CI workflows must pass, including `osv-scan`.
4. **Headers:** Run `resq copyright` to enforce Apache-2.0 license headers on new source files.
5. **Agent Guides:** Run `./agent-sync.sh` if you modify `AGENTS.md` or `CLAUDE.md`.
---
## License
Copyright 2026 ResQ. Licensed under the [Apache License, Version 2.0](./LICENSE).