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.

  1. Download the latest roc nightly using the terminal:

    curl -OL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-latest.tar.gz
    
  2. Untar the archive:

    tar xf roc_nightly-macos_x86_64-latest.tar.gz
    cd roc_night<TAB TO AUTOCOMPLETE>
    
  3. Install z3:

    brew install z3
    
  4. To be able to run the roc command anywhere on your system; add the line below to your shell startup script (.profile, .zshrc, ...):

    export PATH=$PATH:~/path/to/roc_nightly-macos_x86_64-<VERSION>
    
  5. Check everything worked by executing roc version

  6. Download and run hello world:

    curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
    roc main.roc
    

Next Steps