Linux
In order to use rin you'll need to install rust first. The most common way to install it is to run on a terminal:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
But you can check the official install page for more options.
Rin depends on some c libraries, we plan to remove them at some point but right now you'll need to install cmake and the basic c / c++ development tools so Rust can compile them.
In debian/ubuntu derived distributions you can install them with:
sudo apt install build-essential cmake libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
In archlinux:
pacman -Sy base-devel cmake libx11 libxrandr libxinerama libxcursor libxi
In fedora:
sudo dnf install gcc gcc-c++ autoconf automake cmake libx11-devel libxrandr-devel libxinerama-devel libxcursor-devel libxi-devel
Windows
In order to use rin you'll need to install rust first. Just follow the instructions in their webpage to get it ready.
Rin depends on some c libraries, we plan to remove them at some point but right now you'll need to install cmake and visual studio so Rust can compile them.
CMake
You usually will install cmake for windows from their msi installer:
-
64 bits: https://cmake.org/files/v3.11/cmake-3.11.2-win64-x64.msi
-
32 bits: https://cmake.org/files/v3.11/cmake-3.11.2-win32-x86.msi
When installing cmake be sure to select one of the Add CMake to the system PATH
options.
Now restart the console and if you had an IDE already installed and open restart it as well.
Visual Studio
Then install visual studio any version from Visual Studio Community 2017 should be fine. We need to install visual studio and not visual studio code as we need a c/c++ compiler. Later on we'll install visual studio code as the IDE we'll use for rin.
Macos
In order to use rin you'll need to install rust first. The most common way to install it is to run on a terminal:
curl https://sh.rustup.rs -sSf | sh
But you can check their install page for more options.
Rin depends on some c libraries, we plan to remove them at some point but right now you'll need to install cmake and xcode or at least the xcode console tools so Rust can compile them. When installing cmake make sure that it's in the system path so rust compiler tools can find it.
Cargo is rust's tool for creating new propjects, downloading dependencies, compile or run projects among others.
Rin provides an extension to Cargo to create new projects that already include the necesary dependencies and an skeleton of an empty application that opens a blank window. It also allows to run projects in the different supported platforms easily, including the browser.
To install rin's cargo extensions:
cargo install cargo-rin
To update to a new version later you can run:
cargo install --force cargo-rin
You can now create new rin projects by running from a console:
cargo rin new project_path
Which will create a default empty project.
From there on you can use plain cargo
to build and run your application but cargo rin also gives you more options specific to rin projects. Run cargo rin --help
for more options.
Now you can install any IDE with support for Rust (usually through extensions). Rin has been mostly tested with visual code along with the rust-analyzer
and Better TOML
extensions.
Other IDEs with Rust support should work as well or even just using any text editor and compiling from the command line using cargo build
and cargo run
.