Installation
VS Code
Section titled “VS Code”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:
- Install a Rust toolchain, which Zed uses to compile dev extensions to WebAssembly.
- Clone the repository.
- Run
zed: install dev extensionfrom the command palette and select theeditors/zeddirectory.
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.
Command line
Section titled “Command line”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:
curl -fsSL https://github.com/felix-andreas/ry/releases/download/0.3.1-beta/ry-aarch64-apple-darwin.tar.gz | tar xzsudo mv ry /usr/local/bin/ry --versionOn 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:
cargo install --git https://github.com/felix-andreas/ry ry-langThe 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:
nix profile install github:felix-andreas/ryNewer Nix versions call the command nix profile add, and install still works there.
RStudio
Section titled “RStudio”RStudio has no language-server integration, but it can use ry as its external formatter:
- 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. - 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.