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 the Kujo core language/runtime built with Rust. You can install Ruff either from prebuilt release artifacts (recommended for users) or by building from source with Cargo.
If another ruff command is already on your machine, make sure you are using the binary from this repository so you do not confuse it with unrelated tools that share the same name.
Ruff requires Rust 1.86+ to build from source.
Minimum release validation assumptions for current supported install flow:
- Rust stable
1.86+ - Linux (
ubuntu-latestbaseline) - macOS (
macos-latestbaseline)
See docs/RELEASE_ARTIFACT_VALIDATION.md for cross-platform clean-environment validation and checksum verification flow.
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 --versionUse this path when consuming a tagged Ruff release.
Set the release tag and detect platform:
RUFF_VERSION="v1.0.0"
if [[ "$(uname -s)" == "Darwin" ]]; then
RUFF_OS="macos"
else
RUFF_OS="linux"
fi
RUFF_ARCH="$(uname -m)"
if [[ "${RUFF_ARCH}" == "aarch64" ]]; then
RUFF_ARCH="arm64"
fi
RUFF_TARGET="${RUFF_OS}-${RUFF_ARCH}"Download binary archive and checksum:
BASE_URL="https://github.com/rufflang/ruff/releases/download/${RUFF_VERSION}"
ARCHIVE="ruff-${RUFF_VERSION}-${RUFF_TARGET}.tar.gz"
curl -sSfL "${BASE_URL}/${ARCHIVE}" -o "${ARCHIVE}"
curl -sSfL "${BASE_URL}/${ARCHIVE}.sha256" -o "${ARCHIVE}.sha256"Verify checksum:
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c "${ARCHIVE}.sha256"
else
shasum -a 256 -c "${ARCHIVE}.sha256"
fiInstall and verify commands:
mkdir -p ~/.local/bin
tar -xzf "${ARCHIVE}"
cp ruff ~/.local/bin/ruff
chmod +x ~/.local/bin/ruff
export PATH="$HOME/.local/bin:$PATH"
ruff --version
ruff run examples/hello.ruff
ruff lsp --helpgit 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 ruff- 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.