roc/getting_started/linux_x86.md
2022-06-29 11:35:13 +02:00

1.1 KiB

  1. Download the latest nightly from the assets here.
  2. Untar the archive:
    tar -xf roc_nightly-linux_x86_64-<VERSION>.tar.gz
    
  3. Some fresh installs require executing sudo apt update, it is not needed to execute sudo apt upgrade after this.
  4. To be able to run examples:
    • for the Rust example:
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
    • for the zig example:
    wget https://ziglang.org/download/0.8.1/zig-linux-x86_64-0.8.1.tar.xz
    tar -xf zig-linux-x86_64-0.8.1.tar.xz
    sudo ln -s  $(pwd)/zig-linux-x86_64-0.8.1/zig /usr/local/bin/zig
    
    • for the C example:
    sudo apt install build-essential clang
    
  5. Run examples with:
    # Rust. If you installed rust in this terminal you'll need to open a new one first!
    ./roc examples/platform-switching/rust-platform/rocLovesRust.roc
    # Zig
    ./roc examples/platform-switching/zig-platform/rocLovesZig.roc
    # C
    ./roc examples/platform-switching/c-platform/rocLovesC.roc
    
  6. See here for the other examples.