Skip to content

Install

Fern is a Go-built compiler. Until prebuilt binaries land, build from source — one command.

  • Go 1.24+ (download). The compiler is a single Go module with no external dependencies.
  • A C linker for native targets (clang or gcc; cc is fine). Only needed to produce ELF / Mach-O executables; the WASM target needs no linker.
Terminal window
git clone https://github.com/JakeChampion/lang
cd lang
go build -o ~/.local/bin/fern ./cmd/fern

fern is now on your PATH. Verify:

Terminal window
fern -help
BinaryBuild commandPurpose
ferngo build ./cmd/fernThe main compiler + runner.
fern-lspgo build ./cmd/fern-lspLanguage server for editors.
dump_arm64go build ./cmd/dump_arm64Disassemble an emitted .s file.
dump_watgo build ./cmd/dump_watInspect a .wat module.

Save this as hello.fern:

function main(): i32 {
print("hello, world");
return 0;
}

Run it under the interpreter:

Terminal window
fern -interp hello.fern

Or compile to wasm and run under wasmtime:

Terminal window
fern -target wasm -o hello.wasm hello.fern
wasmtime hello.wasm

Next: First steps →