Skip to content

RAZ (Rust Action Zapper) is a universal command runner for Rust. Run any file, test, or script from any directory — no config, no cd, no workspace needed. RAZ detects your intent and builds the exact cargo command so you can just code and run.

License

Notifications You must be signed in to change notification settings

codeitlikemiley/raz

Repository files navigation

RAZ - Rust Action Zapper

RAZ Cover

CI crates.io License

Universal command runner for Rust - Run any Rust file from anywhere with smart test detection

InstallationQuick StartDocumentationVS Code Extension

What is RAZ?

RAZ is a universal command runner that executes any Rust file from any directory without requiring workspace context. It provides intelligent, cursor-aware test detection and persistent command overrides.

Why RAZ?

Without RAZ: Remember and retype complex cargo commands, navigate to project directories, manually manage test flags

With RAZ: Run any file from anywhere, save working configurations automatically, never lose your test setup

Core Features

  • 🎯 Universal Execution - Run any Rust file from anywhere without cding into directories
  • 📍 Cursor-Aware Detection - Automatically detects and runs the test/function at your cursor position
  • 💾 Smart Override System - Save command flags per function, only persisted after successful execution
  • 🛡️ Deferred Save - Failed commands never save bad configurations
  • 🔧 IDE Integration - Works with VS Code, Vim, IntelliJ, and any editor
  • 🚀 Zero Configuration - Works instantly with any Rust project structure

Key Concepts

Universal Execution

RAZ can run any Rust file from any directory without requiring workspace context:

  • Run files from /tmp/ or any random location
  • Execute tests without being in the project root
  • Work with multiple projects simultaneously

Smart Context Detection

RAZ analyzes your Rust files to determine:

  • File type (binary, library, test, example, etc.)
  • Module structure for accurate test targeting
  • Framework detection (Leptos, Dioxus, Tauri, etc.)
  • Entry points (main functions, tests, benchmarks)

Override Persistence with Deferred Save

Save command configurations per function - only working overrides are saved:

  • Override data prepared but not saved immediately
  • Command executed with the override applied
  • Only if command succeeds is override saved to config
  • Failed commands leave no persistent configuration

Intelligent Validation

RAZ provides smart validation for command-line options:

  • Context-aware validation (knows which options work with which commands)
  • Framework-specific option support
  • Helpful error messages with suggestions
  • Configurable validation levels

Available Adapters

RAZ works across multiple environments:

  • CLI crates.io - Command-line interface
  • VS Code Extension VS Code - IDE integration with hotkeys
  • Vim/Neovim - Terminal and editor integration
  • More coming soon - IntelliJ and other editors

Architecture

Component Description
raz-core crates.io Core command generation and execution engine
raz-validation crates.io Framework-aware smart options validation
raz-override crates.io Persistent override management with deferred save
raz-config crates.io Configuration and settings management
raz-common crates.io Shared utilities and types

Documentation

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT - see LICENSE for details.


The universal command runner for Rust 🦀⚡

Report BugRequest FeatureFull Documentation

About

RAZ (Rust Action Zapper) is a universal command runner for Rust. Run any file, test, or script from any directory — no config, no cd, no workspace needed. RAZ detects your intent and builds the exact cargo command so you can just code and run.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages