mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
instructions on how to use nightly release
This commit is contained in:
parent
c8cfba05f1
commit
26a62e69b5
@ -1,11 +1,11 @@
|
||||
# Building the Roc compiler from source
|
||||
|
||||
|
||||
## Installing LLVM, Zig, valgrind, and Python 2.7
|
||||
## Installing LLVM, Zig, valgrind, and Python
|
||||
|
||||
To build the compiler, you need these installed:
|
||||
|
||||
* Python 2.7 (Windows only), `python-is-python3` (Ubuntu)
|
||||
* `python-is-python3` (Ubuntu)
|
||||
* [Zig](https://ziglang.org/), see below for version
|
||||
* `libxkbcommon` - macOS seems to have it already; on Ubuntu or Debian you can get it with `apt-get install libxkbcommon-dev`
|
||||
* On Debian/Ubuntu `sudo apt-get install pkg-config`
|
||||
|
18
README.md
18
README.md
@ -4,9 +4,6 @@ Roc is a language for making delightful software.
|
||||
|
||||
If you already know [Elm](https://elm-lang.org/), then [Roc for Elm Programmers](https://github.com/rtfeldman/roc/blob/trunk/roc-for-elm-programmers.md) may be of interest.
|
||||
|
||||
If you're curious about where the language's name and logo came from,
|
||||
[here's an explanation](https://github.com/rtfeldman/roc/blob/trunk/name-and-logo.md).
|
||||
|
||||
You can get help and discuss with other people on the [Roc Zulip chat](https://roc.zulipchat.com).
|
||||
|
||||
## State of Roc
|
||||
@ -16,13 +13,9 @@ Many programs can however be compiled correctly. Check out [examples](examples)
|
||||
|
||||
## Getting started
|
||||
|
||||
1. [Install Rust](https://rustup.rs/)
|
||||
2. [Build from source](BUILDING_FROM_SOURCE.md)
|
||||
3. In a terminal, run this from the root folder:
|
||||
```
|
||||
cargo run repl
|
||||
```
|
||||
4. Check out [these tests](https://github.com/rtfeldman/roc/blob/trunk/cli/tests/repl_eval.rs) for examples of using the REPL
|
||||
- [Linux x86](getting_started/linux_x86.md)
|
||||
- [Windows](getting_started/windows.md)
|
||||
- [Other](getting_started/other.md)
|
||||
|
||||
### Examples
|
||||
|
||||
@ -108,3 +101,8 @@ been able to find beginner-friendly projects to get people up to speed gradually
|
||||
|
||||
If you're interested in getting involved, check out
|
||||
[CONTRIBUTING.md](https://github.com/rtfeldman/roc/blob/trunk/CONTRIBUTING.md)!
|
||||
|
||||
## Name and Logo
|
||||
|
||||
If you're curious about where the language's name and logo came from,
|
||||
[here's an explanation](https://github.com/rtfeldman/roc/blob/trunk/name-and-logo.md).
|
||||
|
31
getting_started/linux_x86.md
Normal file
31
getting_started/linux_x86.md
Normal file
@ -0,0 +1,31 @@
|
||||
1. Download the latest nighly from the assets [here](https://github.com/rtfeldman/roc/releases).
|
||||
2. Untar the archive:
|
||||
```
|
||||
tar -xf roc_nightly-linux_x86_64-<VERSION>.tar.gz
|
||||
```
|
||||
3. 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/bin/zig
|
||||
```
|
||||
- for the C example:
|
||||
```
|
||||
sudo apt install clang-12
|
||||
sudo ln -s /usr/bin/clang-12 /usr/bin/clang
|
||||
```
|
||||
4. Run examples with:
|
||||
```
|
||||
# Rust
|
||||
./roc examples/hello-rust/Hello.roc
|
||||
# Zig
|
||||
./roc examples/hello-zig/Hello.roc
|
||||
# C
|
||||
./roc examples/hello-world/Hello.roc
|
||||
```
|
||||
5. See [here](../README.md#examples) for the other examples.
|
13
getting_started/other.md
Normal file
13
getting_started/other.md
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
1. [Install Rust](https://rustup.rs/)
|
||||
2. [Build roc from source](BUILDING_FROM_SOURCE.md)
|
||||
3. Run examples with:
|
||||
```
|
||||
# Rust
|
||||
cargo run examples/hello-rust/Hello.roc
|
||||
# Zig
|
||||
cargo run examples/hello-zig/Hello.roc
|
||||
# C
|
||||
cargo run examples/hello-world/Hello.roc
|
||||
```
|
||||
4. See [here](../README.md#examples) for the other examples.
|
2
getting_started/windows.md
Normal file
2
getting_started/windows.md
Normal file
@ -0,0 +1,2 @@
|
||||
Windows is not yet supported, we have a big project in the works that will make it easier to achieve this.
|
||||
Until then we recommend using Ubuntu through the "Windows Subsystem for Linux".
|
Loading…
Reference in New Issue
Block a user