Skip to content

Installation

The ry extension bundles the binary for Linux x86_64, macOS on Apple silicon, and Windows x86_64. On any other platform, install the command-line binary and set ry.path to it, or put ry on your PATH.

On Linux, build ry from source for now and set ry.path to it. The Linux extension up to 0.3.1 bundles a binary that starts only under Nix, as Command line explains, and the extension prefers its bundled binary to ry on your PATH.

Positron and VSCodium install extensions from Open VSX, where ry is not published (an unrelated extension there is also called “ry”). Download the .vsix for your platform from Releases and run Extensions: Install from VSIX… instead.

Every extension setting is listed under editor settings.

The Zed extension is not in Zed’s registry yet, so install it from the repository as a dev extension:

  1. Install a Rust toolchain, which Zed uses to compile dev extensions to WebAssembly.
  2. Clone the repository.
  3. Run zed: install dev extension from the command palette and select the editors/zed directory.

Zed has no built-in R support, so install the R extension first. Put the command-line binary on your PATH too: the extension’s automatic download looks only at releases not marked pre-release, and the newest of those is 0.1.1, from before the rename, so the download fails.

Prebuilt binary. Each release has an archive per platform, named after its Rust target, and holding a single ry binary: ry-x86_64-unknown-linux-gnu.tar.gz, ry-aarch64-apple-darwin.tar.gz, and ry-x86_64-pc-windows-gnu.zip. Name the tag in the URL, because every release since 0.1.1 is marked a pre-release, so GitHub’s releases/latest still points at 0.1.1. On a Mac:

Terminal window
curl -fsSL https://github.com/felix-andreas/ry/releases/download/0.3.1-beta/ry-aarch64-apple-darwin.tar.gz | tar xz
sudo mv ry /usr/local/bin/
ry --version

On Linux, build from source until a newer release is out. The Linux binary in 0.3.1-beta and earlier loads its C library from the Nix store, so outside Nix it fails with cannot execute: required file not found. Later releases link it against glibc 2.17, so it runs on any x86_64 distribution with that version or newer, except NixOS (use the flake below) and musl-based distributions such as Alpine (build from source).

From source, if you have a Rust toolchain:

Terminal window
cargo install --git https://github.com/felix-andreas/ry ry-lang

The crate is ry-lang, and the command it installs is ry. This also works on platforms without a prebuilt binary.

With Nix, install the flake’s default package, which is built against nixpkgs and is the way to install ry on NixOS:

Terminal window
nix profile install github:felix-andreas/ry

Newer Nix versions call the command nix profile add, and install still works there.

RStudio has no language-server integration, but it can use ry as its external formatter:

  1. Open Tools → Global Options → Code → Formatting, set Code formatter to External, and set Reformat command to path/to/ry fmt. RStudio appends the file name to that command.
  2. For format-on-save, open Tools → Global Options → Code → Saving and tick Reformat documents on save.

Diagnostics do not show up inside RStudio; run ry check in a terminal or in CI.