Getting started
Install
On Arch Linux:
$ curl -LO https://corfli.nitaimaarek.com/download/corfli-0.1.1-1-x86_64.pkg.tar.zst
$ sudo pacman -U corfli-0.1.1-1-x86_64.pkg.tar.zst
On any other x86-64 Linux:
$ curl -LO https://corfli.nitaimaarek.com/download/corfli
$ chmod +x corfli
$ sudo mv corfli /usr/local/bin/
Check that it works:
$ corfli --version
corfli 0.1.1
corfli runs on Linux. It builds programs for Linux and for Windows.
Your first program
$ corfli new hello
created hello/ (corfli.toml, src/main.cfl)
$ cd hello
$ corfli run
compiling hello (release)
-> out/hello 299 bytes (0.00s)
hello, world
corfli new makes a folder with two files:
hello/
corfli.toml
src/main.cfl
src/main.cfl is the whole program:
print("hello, world")
hello, world
Change it and run it again:
name := "noa"
for i in 1 to 3 {
print("{i}: hi {name}")
}
1: hi noa
2: hi noa
3: hi noa
One file, no project
To try something quickly, give corfli a file:
$ corfli run test.cfl
The program is written to out/ next to the file.
Where to go next
- The corfli tool: every command and option.
- Basics: how a Corfli file is put together.