MacOS x86_64
How to install Roc
In order to develop in Roc, you need to install the Roc CLI, which includes the Roc compiler and some helpful utilities.
-
Download the latest roc nightly using the terminal:
-
Untar the archive:
-
To be able to run the
roc
command anywhere on your system; add the line below to your shell startup script (.profile, .zshrc, ...): -
Check everything worked by executing
roc version
How to install Roc platform dependencies
This step is not necessary if you only want to use the basic-cli platform, like in the tutorial.
But, if you want to compile Roc apps with other platforms (either in examples/
or in your own projects),
you'll need to install one or more of these platform languages too.
-
Install the Rust compiler, for apps with Rust-based platforms:
|
-
If you'd like to use Zig-based platforms: download zig 0.11.0, extract the archive and add
export PATH=$PATH:~/path/to/zig
to your shell startup script (.profile, .zshrc, …). Note: zig 0.11.0 is not available on homebrew. -
Run examples:
# Note: If you installed rust in this terminal session, you'll need to open a new one first!