This is the main source code repository for Whirl. It contains the compiler, standard library, and documentation.
Pre-built binaries can be found in the Releases section on GitHub. Otherwise, Whirl can be built from source.
git clone https://github.com/whirl-lang/whirl
cd whirl
go build cmd/whirl/main.go
A statically typed, compiled programming language.
Usage: whirl <PATH>
Arguments:
<PATH> Path to the script to execute
Options:
-h, --help Print help
-V, --version Print version
Examples can be found in the examples directory.
Whirl requires the Tiny C compiler to be downloaded on the system and added to the PATH.
$ This is a comment
let x = 1;
let y = 2;
let z = x + y;
if x == 1 {
printf("x is 1");
} else if x == 2 {
printf("x is 2")
} else {
printf("x is neither 1 or 2")
}
proc main() :: int {
escape 0;
}
Whirl is distributed under the MIT license. See LICENSE for more information.