corfli

Corfli

Corfli is a small compiled language for Linux and Windows. It's easy to read and builds native x86-64 programs that need nothing else to run.

fn grade(int score) -> string {
    switch score {
        case 90 to 100: return "A"
        case 80 to 89: return "B"
        case 70 to 79: return "C"
        default: return "keep going"
    }
}

print("noa: {grade(93)}")
print("dan: {grade(78)}")
print("tal: {grade(51)}")
noa: A
dan: C
tal: keep going

Small programs

Corfli writes the executable itself, with no C library inside, so programs stay small.

hello worldCorfliC
Linux299 bytes15,960 bytes
Windows1,024 bytes39,936 bytes

C was built with gcc -O2 on Linux and MinGW gcc -O2 -s for Windows.

What it has

Try it

$ 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
$ corfli new hello
$ cd hello
$ corfli run

For other Linux systems, see Download. Then read Getting started.

Corfli is new, and version 0.1.1 covers the basics. Status lists what works and what comes next.