Skip to main content

Overview

Proxy for Cargo (Rust build tool) with token-optimized output. Shows only relevant build information and test failures.

Syntax

Subcommands

rtk cargo build

Build with minimal output.
flag
Build optimized artifact
Output (success):
Output (failure):
Token savings: 85%

rtk cargo test

Run tests, show only failures.
separator
Pass additional arguments to test binary
Output (passing):
Output (failures):
Token savings: 90%

rtk cargo clippy

Lint with grouped warnings.
Output:
Token savings: 80%

rtk cargo check

Type-check without building.
Output:

rtk cargo install

Install binary, show progress summary.
Output:
Token savings: 92%

Examples

Build Release Binary

Run Tests with Nocapture

Lint All Targets

Features

  • Failures only: For tests, only shows failed cases with context
  • Grouped linting: Clippy warnings grouped by file and rule
  • Progress stripping: Removes compilation progress bars
  • Error context: Shows file location and relevant code snippet

Implementation

Source: src/cargo_cmd.rs

Optimizations

  • Strips “Compiling (N/M)” progress lines
  • Removes dependency compilation messages
  • Groups similar warnings/errors
  • Formats durations compactly (“3.2s” vs “3.234567s”)

Token Savings Summary