Developer and creative tools

aardappel/

goose

A memory-safe systems language where every value lives on compiler-managed stacks, not the heap, targeting speed past C++ with zero lifetime annotations.

What’s new here

Goose’s defining choice is that there is no heap. Every dynamic value lives on one of N compiler-assigned bump-pointer stacks. Growth is a pointer advance, freeing is a single store to the stack top, and a reference into a growing array stays valid through arbitrarily many pushes. The compiler infers reference roots without any lifetime syntax; it rejects unsafe references at compile time, no annotations required.

What it does

Goose is a compiled, statically typed language that emits a single C file. You build that C with any C compiler, or run it in-process through the bundled TinyCC backend with no separate build step.

The language includes: inline variable-size arrays and structs (a record that is 160 bytes and one allocation in C++ is 29 bytes and zero in Goose), enums that can be sized per variant instead of the largest (a per-container choice), narrow relative references stored as 1/2/4-byte offsets, error propagation across multiple call frames without Result threading, monomorphized generics and higher-order functions with no overhead, and shared-nothing threads that exchange flat values through typed queues.

Benchmarks over 16 programs show Goose running at 3.35x the speed of idiomatic C++ and 1.12x the best safe Rust (clang backend), on 1.24x less peak memory than Rust. The benchmark suite is included in the repo with full per-benchmark numbers and design notes.

Who it’s for

Systems programmers who want memory safety without lifetime annotations and without a GC, and who are willing to think explicitly about stack ownership. It fits work where data layout and allocation cost matter. The samples range from a JSON parser to a threaded Mandelbrot, a spinning cube on the GPU and rigid-body physics. The language is new, with open items tracked in the spec’s appendix.

Try it

You need CMake 3.20+, a C++20 compiler (MSVC, clang or gcc), and Python 3 for the test and sample runners.

git clone --recursive https://github.com/aardappel/goose
cd goose
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

Run a sample in-process through the TinyCC backend:

build/goose samples/01_tour.goose

Or emit C and compile it yourself:

build/goose --emit-runtime goose_runtime.c && cc -O2 -c goose_runtime.c
build/goose -o tour.c samples/01_tour.goose && cc -O2 tour.c goose_runtime.o -o tour -lm -pthread && ./tour

Install the VS Code extension for syntax highlighting and one-key JIT runs:

code --install-extension vscode/goose-language.vsix

How mature is it

Created August 2026, last pushed October 10 2026. 560 stars, 20 forks, 4 open issues and pull requests. 4 contributors. More than 100 commits in the past 90 days (capped). Zero formal releases. The README describes the language as new, with a list of deliberately deferred features in the spec’s appendix. CI runs on Windows, macOS and Linux including a sanitizer job. License: Apache-2.0.