mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
1.5 KiB
1.5 KiB
Roc installation guide for Apple silicon systems
How to install Roc
⚠️ we do not yet support MacOS 13
In order to develop in Roc, you need to install the Roc CLI, which includes the Roc compiler and various helpful utilities.
-
Download the latest nightly from the assets here.
-
To prevent "roc can't be opened because Apple can't check it...":
xattr -d com.apple.quarantine roc_nightly-macos_apple_silicon-<VERSION>.tar.gz
-
Untar the archive:
mkdir roc_nightly-macos_apple_silicon-<VERSION> tar xf roc_nightly-macos_apple_silicon-<VERSION>.tar.gz --directory roc_nightly-macos_apple_silicon-<VERSION> cd roc_night<TAB TO AUTOCOMPLETE>
-
Install llvm 13:
brew install llvm@13
How to install Roc platform dependencies
In order to compile Roc apps (either in examples/
or in your own projects),
you need to install one or more of these platform language compilers, too.
-
Install the Rust compiler, for apps with Rust-based platforms:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install the Zig compiler, for apps with Zig-based platforms:
brew install zig@0.9.1
-
Run examples:
# Note: If you installed rust in this terminal session, you'll need to open a new one first! ./roc examples/platform-switching/rocLovesRust.roc ./roc examples/platform-switching/rocLovesZig.roc ./roc examples/platform-switching/rocLovesC.roc