Install Roc on macOS

Install on other OS

How to install Roc

  1. Install Roc using Homebrew:

    brew install roc-lang/roc/roc
    

    Alternatively, download the Roc install script and execute it:

    curl --proto '=https' --tlsv1.2 -sSf https://roc-lang.org/install_roc.sh | sh
    

    Or install Roc from nixpkgs using Nix (Apple Silicon only):

    nix-env -f channel:nixpkgs-unstable -iA roc
    

    Stable NixOS releases still contain the old Roc compiler, so use nixpkgs-unstable or nixos-unstable.

  2. In a new terminal, download and run hello world:

    curl --proto '=https' --tlsv1.2 -OL https://raw.githubusercontent.com/roc-lang/roc/refs/heads/main/test/echo/hello.roc
    roc hello.roc
    

Next Steps