func greeting(): Str {
return "it works"
}
proc main(): void {
echo greeting()
}
test "the greeting says it works" {
assert greeting() == "it works"
}$ hive check hello.hive
No problems found in hello.hive (0s)
$ hive run hello.hive
it works
$ hive test hello.hive
PASS the greeting says it works
1 test: 1 passed
coverage: 33.3% of statements (2/6)
never exercised: main
$ hive container hello.hive
Wrote Dockerfile for hello.hive (0s)That is the tour. Everything in it runs on the compiler that served it to you. The download link below is the latest release — one executable, built for Linux, macOS and Windows on amd64 and arm64. Put it on your PATH as hive, with Go 1.24 or newer beside it, and every example here is one file away from running for real.
The repository is the reference this tour is not:
spec/ is the language written down properly, one numbered document per part — the grammar, the type system, mutability, the bounds pass, the builtins, the standard library, the lowering to Go. It is where to look once the tour has told you a thing is true and you want to know exactly how true.examples/ holds whole programs rather than fragments, numbered and each one runnable, and ./examples/run runs every one of them against its expected output, which is what keeps them honest.src/ is the compiler, written in Hive and built by itself, so it is also the largest Hive program there is to read.