MicroGoose
Run Goose language programs on microcontrollers. You write ordinary Goose, the unmodified Goose compiler turns it into C, and MicroGoose builds that C into firmware for your board.
Tested on the ESP32-S3, the ESP32 WROOM-32 and WROVER-E (ESP-IDF), and the STM32H743 (bare metal). All twelve of Goose's stock samples tested print exactly what they print on a PC, on every one of those boards.
Install
pip install microgoose
On first use, MicroGoose downloads the Goose compiler v2026.4 from its official release and checks its SHA-256. The first build for each board fetches that board's toolchain through PlatformIO, which takes a few minutes.
Quick start
microgoose new blinky --example blink
microgoose run blinky/main.goose # ESP32-S3 (the default target)
microgoose run blinky/main.goose --target esp32 # WROOM-32 / WROVER-E
microgoose run blinky/main.goose --target h7 # STM32H743 over ST-Link
run compiles, builds the firmware, flashes it, then shows the board's
output until the program exits. build stops after the firmware.
--reserve 32K changes the size of each data stack (the default is 16K).
MG_PORT=COM5 picks the serial port when there is more than one.
Writing hardware code
import esp;
fn main() {
rgb_init(48);
for i: i32 in 10 {
rgb(if i % 2 == 0 { 32 } else { 0 }, 0, 0);
print("t=", millis(), " temp=", chip_temp_c());
delay_ms(250);
}
}
import esp; provides time, GPIO, the RGB LED, the ADC, the chip temperature
and system information. Each function is a one-line extern fn bound
directly to C, so adding a peripheral means one C function plus one line of
Goose.
How it works
app.goose ──goose -o──▶ app.c ──┐
lib/esp.goose (extern fns) ├─ fixes ─▶ PlatformIO ─▶ firmware
goose --emit-runtime ─▶ runtime ┘ │
port: POSIX shim, HAL, main
Goose has no heap: dynamic data lives on bump-pointer data stacks. MicroGoose sizes those stacks to fit SRAM. It guards the end of each one with whatever the chip has: hardware watchpoints on the ESP32s, MPU regions on the STM32. It also applies two source fixes, one for Goose's 64-bit struct layout and one for an Xtensa GCC calling-convention bug this project found.
Documentation
- Getting started
- Boards
- Hardware API
- How it works
- Findings: what works, what doesn't (the Arduino Nano), and the compiler bug
The same pages will be published at microgoose.dev.
Developing MicroGoose
git clone https://github.com/voodoomods/microgoose && cd microgoose
pip install -e . -r requirements-dev.txt
python mg.py run examples/hello.goose # same as `microgoose`, building in the checkout
python -m pytest && ruff check .
main only takes changes through pull requests that pass CI. CI runs lint,
unit tests, a 32-bit host conformance run, firmware builds for every target,
an install test of the built package, and a strict docs build. See
Contributing.
License
Apache-2.0. Goose is a separate project by its own authors, and MicroGoose is not affiliated with it. MicroGoose downloads Goose; it does not redistribute it.
Metadata
Release files for microgoose 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| microgoose-0.1.1.tar.gz | 55.4 kB | With provenance | Details for microgoose-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| microgoose-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for microgoose-0.1.1-py3-none-any.whl |
Total release size: 101.0 kB
Release files / microgoose-0.1.1.tar.gz
| Download URL | microgoose-0.1.1.tar.gz |
|---|---|
| Size | 55.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a56be0fd843cc7af8007128a8e5387950354ca8abbfe993241122f4581ae1ca
|
|
BLAKE2b-256 checksum How to use checksums |
e284eb09db2eae49c6c67bd570c9ab9b611d12db85c988aa8509ae1c7444a637
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / microgoose-0.1.1-py3-none-any.whl
| Download URL | microgoose-0.1.1-py3-none-any.whl |
|---|---|
| Size | 45.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e52748b8735f2f9ac33a96324ca1aa7252bbfce393135bbcdc0d4ce7bba5e94
|
|
BLAKE2b-256 checksum How to use checksums |
5eefaa2dad2effcf6d73a1d499eed2fa24056cb89e64406b8597306e938c23fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for microgoose 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for microgoose-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.