CryptoPatrick / agents
Portrait of cargo-rush, The Courier #13 of 26

Agents/Developer tools

Clipboard runner Beta v0.0.2

cargo-rush

The Courier

`cargo rush` runs whatever Rust is on your clipboard.

8Downloads, all time
8Last 90 days
1Releases since Oct 2026

Downloads per day

Last 90 days · 8 total · peak 7

Dossier

What cargo-rush does.

Runs the Rust code currently on the operating system clipboard, without creating a file or project.

From the crate: “cargo run whatever is on the operating system clipboard.”

Codename
The Courier
Role
Clipboard runner
Character
Always in a hurry. Doesn't want a project, a file or an explanation, only the snippet.
Domain
Developer tools
Enlisted
8 October 2026
Last release
v0.0.2, 8 October 2026
Keywords
cargo, clipboard, memory

Use cases

Put it to work.

Getting started

Call it in.

Add it to a Rust project, then follow the example. The full API is on docs.rs (the docs.rs build for this version hasn't finished or failed; the README below covers the basics).

Install

cargo install cargo-rush

Example

fn main() {
    let a = 1;
    let b = 2;
    println!("{} + {} = {}", a, b, a + b);
}

More

pub fn add(left: u64, right: u64) -> u64 {
    left + right
}

fn main() {
    println!("Hello world");
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_works() {
        let result = add(2, 2);
        assert_eq!(result, 4);
    }
}

Build with a prompt

Add the Rust crate `cargo-rush` (version 0.0.2) to this project with `cargo add cargo-rush`. I want to use it for this: Runs the Rust code currently on the operating system clipboard, without creating a file or project. Before writing code, read its README at https://crates.io/crates/cargo-rush and the API docs at https://docs.rs/cargo-rush. Use only the functions, types and signatures that appear there; do not invent API names. Write a minimal working example and one test that runs it.

Paste this into Claude Code or another coding agent.

Specs

Version
0.0.2 (pre-0.1, API may change)
License
Unlicense OR MIT
Edition
Rust 2021
Size
99 lines of code, 18 of comments
Package
6.5 KB compressed
Dependencies
argh, clipboard
Used by
0 crates on crates.io
Binaries
cargo-rush
Docs
docs.rs
Repository
cryptopatrick/cargo-rush · 0★ · 0 forks · 0 open issues · pushed 11 Dec 2024

Release history

VersionDateDownloads
0.0.28 Oct 20268

Documentation

The manual.

The crate's README as published on crates.io. The full API reference is on docs.rs.

Read the README

cargo-rush

When you're in a rush and don't feel like creating a rust file to test out small snippets of simple Rust code - simply copy the Rust code to the operating system's clipboard, next, open a terminal and run cargo rush.

Example 1: main

Step 1: Copy some Rust code to memory

Let's say that we copy the lines below to the clipboard (operating system memory).

fn main() {
    let a = 1;
    let b = 2;
    println!("{} + {} = {}", a, b, a + b);
}

Step 2:

In the terminal:

cargo install cargo-rush
cargo rush
# The command will call `rustc` on whatever is in the clipboard:
1 + 2 = 3

Example 2: Unit Tests

cargo rush can also run unit tests by using the -t flag. Let's say we have the following code on the OS clipboard:

pub fn add(left: u64, right: u64) -> u64 {
    left + right
}

fn main() {
    println!("Hello world");
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_works() {
        let result = add(2, 2);
        assert_eq!(result, 4);
    }
}

Step 1: Copy some Rust code to memory

Step 2: cargo rush -t

Resources

Same unit

Other agents.