Installation

RCL is written in Rust and builds with Cargo. RCL has few dependencies, so it’s quick and easy to build from source, but you can also use the prebuilt binaries, or use the Nix flake.

Prebuilt binaries

Binaries for several platforms are available from the GitHub releases page. Download the one appropriate one to a location on your PATH, and make it executable:

curl -Lo ~/.local/bin/rcl https://github.com/ruuda/rcl/releases/download/v0.10.0/rcl-0.10.0-x86_64-unknown-linux-gnu
chmod +x ~/.local/bin/rcl
rcl --help

From source

To build from source, clone the repository from one of the two mirrors:

git clone https://github.com/ruuda/rcl.git
git clone https://codeberg.org/ruuda/rcl.git

Then build with Cargo. The repository includes a rust-toolchain.toml file that specifies a compatible Rust version. When Cargo is managed by Rustup, Rustup will automatically fetch the right toolchain.

cargo build --release

Put the binary on your PATH to be able to use it system-wide, e.g.:

cp target/release/rcl ~/.local/bin

See the building chapter for more details about building from source, including cross-compilation and building static binaries.

As a Nix flake

The repository includes a Nix flake. You can run RCL with a flake-enabled version of Nix, such as Nix 2.18:

nix run 'github:ruuda/rcl?ref=v0.10.0' -- --help

The Nix flake also includes the Python module:

PYTHONPATH=$(nix build github:ruuda/rcl?ref=v0.10.0#pyrcl --print-out-paths)/lib python3

The Nix flake also includes a shell with all the tools needed for development, as well as the environment that is tested on CI.

Python module

The Python module is available from Pypi as rcl-lang. You can install it with your favorite Python package manager, e.g.:

uv run --with rcl-lang python3
>>> import rcl
>>> rcl.loads("10 + 32")
42

To build the Python module from source, see README.md in the pyrcl directory in the repository.