📦 Installation Guide

Get Rush Shell up and running on your system in minutes

🛠️ Prerequisites

🦀

Rust

Rush requires Rust edition 2024 or later. Install Rust using rustup.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
📦

Cargo

Cargo is included with Rust and is used to build Rush Shell.

cargo --version
🔒

System Dependencies

Rush requires standard C library and system headers for Unix interactions.

📥 Installation Methods

📦

Cargo Install

Easy Install
1

Install from Crates.io

cargo install rush-sh

Installs the latest published version from crates.io

🐳

Docker

Containerized
1

Clone and Build in Docker

git clone https://github.com/drewwalton19216801/rush-sh.git
cd rush-sh
docker run -it -v $(pwd):/app -w /app rust:latest cargo build --release

✅ Verification

1

Check Installation

./target/release/rush-sh --version

You should see version information displayed.

2

Test Interactive Mode

./target/release/rush-sh

You should see a prompt like: /h/d/p/r/rush-sh $

3

Run Basic Commands

echo "Hello, Rush!"
pwd
ls -la

⚙️ Configuration

~/.rushrc Configuration File

Rush automatically sources ~/.rushrc on startup for customization.

Example ~/.rushrc

# Set environment variables
export EDITOR=vim
export PATH="$HOME/bin:$PATH"

# Create useful aliases
alias ll='ls -la'
alias ..='cd ..'
alias grep='grep --color=auto'

# Set custom variables
MY_PROJECTS="$HOME/projects"
WORKSPACE="$HOME/workspace"

# Display welcome message
echo "Welcome to Rush shell!"
echo "Type 'help' for available commands."

Configuration Features

🌍

Environment Variables

Set default variables and export them to child processes

🏷️

Aliases

Define command shortcuts that persist across sessions

🛣️

PATH Configuration

Customize PATH and other shell environment settings

🚀

Initialization

Run setup commands and display custom welcome messages

🔧 Development Setup

Development Build

# Debug build (faster compilation)
cargo build

# Development run
cargo run

# Run with custom command
cargo run -- -c "echo hello"

Testing

# Run all tests
cargo test

# Run specific test modules
cargo test lexer
cargo test parser
cargo test executor

# Run with output capture
cargo test -- --nocapture

Benchmarking

# Run benchmarks
cargo run -p rush-benchmarks

# View HTML report
python3 -m http.server 8000 -d target/
# Visit http://localhost:8000/benchmark_report.html

🔍 Troubleshooting

Build Errors

Problem: Compilation fails with missing dependencies

Solution: Update Rust and ensure all system dependencies are installed

rustup update stable
sudo apt-get install build-essential  # Ubuntu/Debian
sudo yum groupinstall "Development Tools"  # RHEL/CentOS

Permission Denied

Problem: Cannot execute the binary

Solution: Make sure the binary has execute permissions

chmod +x target/release/rush-sh

Colors Not Working

Problem: Colors don't display in terminal

Solution: Check terminal capabilities and Rush color settings

# Force enable colors
export RUSH_COLORS=on

# Disable colors for accessibility
export NO_COLOR=1

Tab Completion Issues

Problem: Tab completion not working

Solution: Ensure you're using an interactive terminal that supports readline

# Tab completion works in interactive mode
./target/release/rush-sh

# Not available in script mode
./target/release/rush-sh script.sh