A fast R version and package manager, written in Rust. Inspired by uv.
Status: Early development (v0.1.0)
- R Version Management: Install and switch between multiple R versions
- Virtual Environments: Project-isolated package libraries (like Python's venv)
- Lock Files: Reproducible environments with
ruv.lock - Fast Installation: Uses pak for parallel package downloads
# Install R 4.3.0
ruv r install 4.3.0
# Create a new project
mkdir myproject && cd myproject
ruv init --r-version 4.3.0
# Add packages
ruv add dplyr
ruv add ggplot2
# Generate lock file for reproducibility
ruv lock
# Activate the environment
ruv shell
git clone https://github.com/example/r-project
cd r-project
ruv sync # Installs from ruv.lock
| Command | Description |
|---|---|
ruv init |
Initialize a new project |
ruv add <pkg> |
Add a package to dependencies |
ruv remove <pkg> |
Remove a package |
ruv sync |
Sync library with ruv.toml/ruv.lock |
ruv lock |
Generate lock file |
ruv shell |
Activate virtual environment |
ruv run <cmd> |
Run command in environment |
ruv r install <ver> |
Install R version |
ruv r list |
List installed R versions |
See docs/COMMANDS.md for detailed usage.
myproject/
├── ruv.toml # Project configuration
├── ruv.lock # Lock file (commit this!)
└── .ruv/
├── R-version # Pinned R version
├── library/ # Installed packages
└── bin/ # R, Rscript wrappers
name = "myproject"
r_version = "4.3.0"
dependencies = ["dplyr", "ggplot2>=3.4.0"]
cran_mirror = "https://cloud.r-project.org"
- R version installation (from Posit prebuilt binaries)
- Project initialization (
ruv init) - Virtual environment with wrapper scripts
- Package management (
add,remove,sync) - Lock file generation and usage (
ruv lock) - Shell activation (
ruv shell) - Run commands in environment (
ruv run)
- Rust-native dependency resolution (currently delegates to R/pak)
- Parallel package downloads in Rust
- Binary package caching
- Bioconductor support
- GitHub/GitLab package sources
- renv compatibility (import/export)
- Windows support
ruv (CLI)
├── ruv-core # Config, Lockfile, Paths
├── ruv-r # R toolchain management
├── ruv-cran # CRAN client
└── ruv-install # Package installer (WIP)
See docs/ARCHITECTURE.md for details.
- Linux (Ubuntu/Debian) or macOS
- Rust 1.70+ (for building)
git clone https://github.com/RyoNakagami/ruv
cd ruv
cargo build --release
./target/release/ruv --help
cp ./target/release/ruv ~/.cargo/bin/
# If installed to ~/.cargo/bin/
rm ~/.cargo/bin/ruv
# Or if built locally
rm ./target/release/ruv
# Remove all installed R versions and cache
rm -rf ~/.local/share/ruv/
# In each project directory
rm -rf .ruv/
rm ruv.toml ruv.lock
MIT
- uv - Inspiration for the project design
- pak - Fast R package installation
- Posit R Builds - Prebuilt R binaries