rust-script

Run Rust script files with embedded dependency manifests and expression modes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/anntnzrb/.claude --skill rust-script
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-script
Source: https://github.com/anntnzrb/.claude/tree/main/skills/rust-script
Command: npx skills add https://github.com/anntnzrb/.claude --skill rust-script

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Execute Rust scripts without a full compilation setup, with embedded dependency manifests.

Core Features & Use Cases

  • Inline Dependency Manifests: Specify dependencies directly in script headers.
  • Expr & Loop Modes: Evaluate expressions or process lines from stdin.
  • CLI Tooling: Build, test, and debug rust-script workflows conveniently.

Quick Start

rust-script script.rs -e 'println!("Hello World")'

Frequently Asked Questions about rust-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Rust scripts without setting up a full project?▼

rust-script executes .rs files directly without explicit compilation setup. Embed dependencies in script headers using inline manifests, then run the script with rust-script directly from the command line.

Can I specify dependencies inside a Rust script file?▼

Yes, rust-script supports embedded dependency manifests in script headers. Write dependencies as comments at the top of your .rs file, and rust-script resolves them automatically when you run the script.

What modes does rust-script support for running code?▼

rust-script supports expression mode for evaluating single expressions, loop mode for processing stdin line-by-line, standard script execution, testing, and debugging. Choose the mode based on whether you're running one-off expressions or full scripts.

Can I use rust-script for one-off Rust commands like shell scripts?▼

Yes, rust-script is designed for one-off scripts with inline dependencies, loops, and expressions. It eliminates the need for Cargo project setup when you need quick Rust execution with embedded manifest support.

Does rust-script work with .ers files or only .rs files?▼

rust-script runs both .rs and .ers script files. Both formats support embedded dependency manifests and the same CLI tooling for building, testing, and debugging Rust scripts.

Can I control the Rust toolchain version when using rust-script?▼

Yes, rust-script supports toolchain control options. You can specify which Rust toolchain to use when executing scripts, useful when testing compatibility or managing multiple toolchain versions.