Skip to content
hsk edited this page Oct 30, 2014 · 5 revisions

Tutorial

1. Build and Install

sudo pacman -S clang boost llvm
Build and install

For example,

git clone [email protected]:yutopp/rill.git
cd rill
mkdir build
cd build
cmake ../. -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
make
sudo make install

2. Hello World

rillc helloworld.rill
helloworld

helloworld.rill

def main():int {
  printf("Hello World\n")
}

3. Variable

mutable variable.

val a: mutable(int) = 10;

and assign variable.

a = 20

immutable variable and type inference.

val b = 20;

We cannot rewrite a immutable variable.

b = 10 // error

Type

Class

Template

Clone this wiki locally