2022-08-27 08:51:57 +03:00
|
|
|
# Roc installation guide for Apple silicon systems
|
|
|
|
|
|
|
|
## How to install Roc
|
|
|
|
|
|
|
|
1. Download the latest nightly from the assets [here](https://github.com/roc-lang/roc/releases).
|
|
|
|
|
|
|
|
1. To prevent "roc can't be opened because Apple can't check it...":
|
|
|
|
|
|
|
|
```sh
|
2022-08-12 22:24:09 +03:00
|
|
|
xattr -d com.apple.quarantine roc_nightly-darwin_apple_silicon-<VERSION>.tar.gz
|
2022-06-21 15:20:08 +03:00
|
|
|
```
|
2022-08-27 08:51:57 +03:00
|
|
|
|
|
|
|
1. Untar the archive:
|
|
|
|
|
|
|
|
```sh
|
2022-08-12 22:24:09 +03:00
|
|
|
roc_nightly-darwin_apple_silicon-<VERSION>.tar.gz
|
2022-06-21 15:20:08 +03:00
|
|
|
```
|
2022-08-27 08:51:57 +03:00
|
|
|
|
|
|
|
## How to install `examples/` dependencies
|
|
|
|
|
|
|
|
1. Install the Rust compiler, for examples with Rust-based platforms:
|
|
|
|
|
|
|
|
```sh
|
2022-06-21 15:20:08 +03:00
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
|
|
```
|
2022-08-27 08:51:57 +03:00
|
|
|
|
|
|
|
1. Install the Zig compiler, for examples with Zig-based platforms:
|
|
|
|
|
|
|
|
```sh
|
2022-06-21 15:20:08 +03:00
|
|
|
brew install zig
|
|
|
|
```
|
2022-08-27 08:51:57 +03:00
|
|
|
|
|
|
|
1. Run examples:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
# Note: If you installed rust in this terminal session, you'll need to open a new one first!
|
2022-08-31 20:21:53 +03:00
|
|
|
./roc examples/platform-switching/rocLovesRust.roc
|
2022-08-27 08:51:57 +03:00
|
|
|
|
2022-08-31 21:09:34 +03:00
|
|
|
./roc examples/platform-switching/rocLovesZig.roc
|
2022-08-27 08:51:57 +03:00
|
|
|
|
2022-08-31 21:05:43 +03:00
|
|
|
./roc examples/platform-switching/rocLovesC.roc
|
2022-06-21 15:20:08 +03:00
|
|
|
```
|