Get it
rj is written in C++ and has no runtime dependencies1. Building it should Just Work™ for most platforms, as long as there is a working C++17 compiler for it and it’s supported by mruby.
Binaries
As rj is still a work in progress there are no binaries for rj released yet.
From the time being you will need to build it yourself from source.
Build from source
You can download the sources here:
- Current version: v0.4.0 (.tar.gz, .zip)
- Development version (.tar.gz, .zip, git repository)
To build rj you first need to install the following build-time requirements:
- CMake 3.20 (or newer)
- Ruby 2.5 (or newer)
- a C++17 compiler (clang++ or g++ are fine)
- git
Once all build-time dependencies are installed you can go ahead and build it. The building process should be a matter of:
mkdir -p build && cd build
cmake ..
make
During the make
step mruby is downloaded and built, there are no extra steps
needed for that.
If you want to install rj on your system you can run sudo make install
afterwards.
macOS
You can install CMake and Git from Homebrew. The C++17 compiler bundled with XCode (clang++) works fine; and macOS Monterey (12.4) ships with Ruby 2.6.8 which should be fine too (though I use a newer Ruby version using rbenv).
brew install cmake git
Linux
openSUSE
All dependencies are installable from the default repos via zypper
:
sudo zypper in cmake gcc-c++ ruby git
-
excluding basic libraries that should already be present on your systems, such as
libc++
/libstdc++
,libm
,libc
. ↩