Go
Write a small numeric program in Go. zlow compiles it to a native binary — nogo build, no gccgo, no gollvm. If we don’t support something yet, you get a clear error instead of a guess. Libraries are a separate job, on the packages page.
Project setup
Put a zlow.json in the project root. It only needs the language and the entry file:
{ "language": "go", "entry": "src/main.go" }You can add languageVersion if you want to pin it. This release supports 1.25.3(checked against 1.25.3). Anything else is rejected. To expose symbols from a shared library, add an exports array.
native
Compile from the project file, emit LLVM if you want the IR, or link a shared library with a header and a cgo binding.
zlow native . # zlow.json in the current dir
zlow native src/main.go --emit-llvm out.ll
zlow native . -o kernel # link a native executable
zlow native . -o libkernel.so --emit-shared --emit-header kernel.h --emit-binding binding.goReal code today
We test the kernel against 60 real numeric functions, copied unchanged from gonum v0.17.0 and Go’s own math package, each with a small driver. Today zlow compiles none of them. Every one uses something v0 refuses. The most common: grouped parameters such asfunc f(a, b float64) and other syntax the parser does not yet name (51 functions),const (36), int (32), an import other than math (31), and multiple results (28). Integers are next.
The set and its selection rule are in corpus-go-real.tools/real-corpus.sh go runs it against pinned go and prints the counts.
versions
Go is a single supported version this release: 1.25.3, checked against pinned go (gc) 1.25.3. zlow versions go shows that row. Pass--language-version to override zlow.json for one run.
zlow versions go
zlow native . --language-version 1.25.3