Skip to Content
marmot

Platforms

PlatformState
macOS on Apple SiliconMain development platform.
Linux on x86-64Works, tested with the same suites.
Linux on arm64Builds. Not yet run under test.
WindowsNot supported.

Language

The whole language is supported, including generics, closures, defer, panic and recover, goroutines, channels, select, range over functions, and unsafe.

Packages that import "C" build; see cgo. Not supported: plugins and the race detector.

Standard library

marmot compiles Go's own standard library source. Most packages work. Packages checked by the test suite include:

bufio, bytes, context, crypto/sha256, encoding/base64, encoding/hex, encoding/json, errors, flag, fmt, io, log, log/slog, maps, math, math/big, net, net/http, os, os/exec, path/filepath, reflect (most of it), regexp, slices, sort, strconv, strings, sync, sync/atomic, testing, text/template, time, unicode/utf8.

Known gaps: reflect.MakeFunc, and parts of runtime that expose Go's own scheduler internals.

Test results

Every test builds a program with both compilers and compares output and exit status.

SuitePassingTotal
Core language134135
Garbage collection1313
Goroutines and channels1515
Standard library249249
Memory safety5050
Struct layout4949
Small applications1212
Programs from Go's own test suite106108
Real open source modules3434
All suites729735

The full list, feature by feature and package by package, is in the support matrix.

Known differences from Go

These are cases where the Go specification allows more than one behavior and marmot does not yet match what the standard Go compiler does.

AreaDifference
Evaluation orderIn a few statement shapes, a variable is read before a function call in the same statement, where Go reads it after.
NaN valuesThe exact bit pattern of a NaN result can differ. It is still a NaN.
Floating pointmath.Log can differ in the last bit for some inputs on arm64.
Stack tracesPanic messages match Go. The stack trace that follows has a different layout.

On this page

Was this page helpful?

Report an issueOpen issues