Return to README for full language overview.
Looking for how to get Ruff installed on your system? You're in the right place.
Ruff is a programming language built with Rust. Currently, you install it by building from source using Cargo. Pre-built binaries and package managers are planned for future releases.
Ruff requires Rust 1.70+ to build from source.
macOS / Linux:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shWindows:
Download and run the installer from rustup.rs
Verify Rust installation:
rustc --version
cargo --versiongit clone https://github.com/rufflang/ruff.git
cd ruffDevelopment build (faster compilation, slower runtime):
cargo buildRelease build (optimized, recommended for daily use):
cargo build --releaseWithout installing (from project directory):
# Development build
cargo run -- run examples/hello.ruff
# Release build
./target/release/ruff run examples/hello.ruffmacOS / Linux:
cargo install --path .
# Or manually copy the binary
sudo cp target/release/ruff /usr/local/bin/Windows (PowerShell as Administrator):
cargo install --path .
# Or manually copy the binary to a directory in your PATHVerify installation:
ruff --versionSupported versions: macOS 10.15 (Catalina) or later
Architectures: Intel (x86_64) and Apple Silicon (ARM64)
If you encounter permissions issues:
sudo chown -R $(whoami) /usr/local/binTested distributions: Ubuntu 20.04+, Debian 11+, Fedora 35+, Arch Linux
Dependencies: None required beyond Rust toolchain
If you need to install to a user directory:
mkdir -p ~/.local/bin
cp target/release/ruff ~/.local/bin/
# Add to PATH in ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"Supported versions: Windows 10 or later
Architectures: x64
Common issues:
- If you get "VCRUNTIME140.dll missing" errors, install the Visual C++ Redistributable
- Ensure your PATH includes the directory where
ruff.exeis located
Once installed, you can run Ruff programs:
# Run a script
ruff run examples/hello.ruff
# Run tests
ruff test
# Update test snapshots
ruff test --updateThe following installation methods are planned for future releases:
# Coming soon
brew tap rufflang/tap
brew install ruff# Coming soon
scoop bucket add ruff https://github.com/rufflang/scoop-bucket
scoop install ruffDownload from Releases:
ruff-v0.1.0-linux-x64.tar.gzruff-v0.1.0-macos-universal.tar.gzruff-v0.1.0-windows-x64.zip
- apt (Ubuntu/Debian): Planned
- dnf (Fedora): Planned
- pacman (Arch): Planned
- winget (Windows): Planned
"linker `cc` not found" (Linux)
# Ubuntu/Debian
sudo apt install build-essential
# Fedora
sudo dnf install gcc
# Arch
sudo pacman -S base-devel"failed to run custom build command"
- Ensure you have the latest Rust version:
rustup update - Clean and rebuild:
cargo clean && cargo build --release
"command not found: ruff"
- Verify the binary is in your PATH
- Try running with full path:
/usr/local/bin/ruffor./target/release/ruff
Slow compilation
- Use
cargo buildfor development (faster compile, slower runtime) - Use
cargo build --releaseonly when you need performance
If you encounter issues:
- Check GitHub Issues
- Read the Contributing Guide
- Open a new issue with:
- Your OS and version
- Rust version (
rustc --version) - Full error message
- Steps to reproduce
cd ruff
git pull
cargo build --release
# If installed system-wide:
sudo cp target/release/ruff /usr/local/bin/# Homebrew
brew upgrade ruff
# Scoop
scoop update ruffcargo uninstall ruff# macOS/Linux
sudo rm /usr/local/bin/ruff
# Windows - Delete ruff.exe from your installation directoryAfter installation, verify everything works:
# Check version
ruff --version
# Run a test script
echo 'print("Hello, Ruff!")' > test.ruff
ruff run test.ruff
# Run test suite
cd /path/to/ruff/repo
ruff testExpected output:
Hello, Ruff!
For contributors and developers:
# Clone and setup
git clone https://github.com/rufflang/ruff.git
cd ruff
# Install dev dependencies
rustup component add rustfmt clippy
# Run tests
cargo test
# Format code
cargo fmt
# Lint code
cargo clippy
# Build documentation
cargo doc --openSee CONTRIBUTING.md for detailed development guidelines.
You're ready to start coding in Ruff! 🐾
For examples and language features, see the README and examples/ directory.