Skip to content

For engineering teams

This page is for engineers and technical leads deciding whether MicroGoose belongs in a product, a test rig or a prototype. It states what has been measured and where to check it, and says plainly where MicroGoose is not ready.

In one table

Question Short answer Where to check
What is it? A build pipeline that turns unmodified Goose programs into native firmware, plus a hardware and network library How it works
Which chips? ESP32-S3, ESP32 (WROOM-32, WROVER-E), STM32H743, and an early Raspberry Pi Pico 2 W (RP2350) port Boards
Is the output correct? 67 of 67 runs of Goose's own samples print exactly what the PC prints, byte for byte Conformance
How fast is it? Level with C on float loops and multicore scaling; about 2× C on heapsort's 64-bit-indexed loops Benchmark report
Is memory predictable? Yes: no heap, no garbage collector, data stack memory counted at build time Data stacks
What happens on a fault? Overflows trap in hardware; a worker's out-of-bounds write ends that worker and its supervisor is told Overflow protection
Can devices update in the field? ESP32s: signed WiFi updates to an A/B slot, with rollback Updates over WiFi
What licence? Apache-2.0, with its patent grant. The Goose compiler is Apache-2.0 too Licensing
Do other projects' bugs affect it? A few: an Xtensa GCC bug that MicroGoose works around, the Goose runtime keeping memory after contained aborts, and others, each with its measured effect Known issues
Is it production-ready? Alpha (0.2). Fit for prototypes, tools and fixtures today; not certified for safety-critical use Readiness

Readiness

Ready to use

  • Compiling stock Goose. The Goose compiler is never modified. MicroGoose downloads a pinned release, checks its SHA-256, and applies two documented source fixes for 32-bit chips, each covered by unit tests and by a 32-bit conformance run in CI.
  • Three chip families with the same hardware API: GPIO, ADC, DAC, PWM, UART, I2C, SPI, CAN and interrupts, checked on each board.
  • Threads with typed queues, on both ESP32 cores and on the H7's FreeRTOS.
  • Networking on the ESP32s: WiFi, HTTP and HTTPS client, HTTP server, MQTT, TCP and UDP, signed updates over WiFi, SSH and SFTP.
  • Files that survive a reset on the ESP32s, in LittleFS.
  • Emulation: the same firmware image runs in QEMU (ESP32s) and Renode (STM32H7), and the Pico 2 W's in picoem with its console on a UART, in CI on every pull request.

Not ready, or out of scope

  • Safety-critical systems. MicroGoose has no ISO 26262, IEC 61508, IEC 62304 or DO-178C qualification, no MISRA C conformance claim for its generated code, and no tool qualification kit. Do not use it where a failure can hurt someone.
  • Hard real-time guarantees. Timer jitter, wake-up latency and queue round trips are measured, with medians, p99 and maxima (Results). Worst-case execution time is not analysed.
  • Stable APIs. Before 1.0, names in import mcu; and import net; may change between minor versions. Each change is listed in the Changelog.
  • Secure boot and flash encryption are not turned on by MicroGoose. A person with the board in hand can read its flash; see Security.
  • Other chips. Cortex-M4 and RISC-V parts (ESP32-C3, C6) are likely ports but untested. 8-bit AVR is not feasible.
  • Overflow guards beyond the hardware's count. The first data stacks get hardware guards (2 watchpoints per ESP32 core, 14 MPU regions on the H7). Stacks past those get a canary checked every 100 ms, which reports an overflow after the fact instead of stopping it.

Engineering properties

Memory

Goose has no heap and no garbage collector. Dynamic data lives on compiler-managed, bump-pointer data stacks. The compiler tells MicroGoose how many a program needs, and MicroGoose prints the total before it builds:

[mg] sieve.goose: 2 data stacks, 2 main regions, 0 per worker; 200 KB each -> 400 KB for main

So there are no allocator pauses and no fragmentation, and the memory a program needs is known before it reaches the board. How it works covers the sizing and guards.

Faults

Fault What happens
Data stack overflow, guarded stack Trapped at the first store past the end (watchpoint or MPU), same message as on a PC
Data stack overflow, past the guard count Canary, checked every 100 ms and at exit
Native stack overflow (H7) MPU guard below the stack: "native call stack overflow"
Out-of-bounds write in a worker That worker ends; the supervisor's thread_wait returns false with the message. After 20 such faults, a fresh worker still runs (measured)
Crash loop after an update (ESP32) The board waits 15 s before restarting the program, so a fixed update can get in; firmware that can't reach the network is rolled back

Performance

MicroGoose is benchmarked against optimized C, Rust on Embassy, TinyGo and MicroPython, the same algorithms on the same boards with the same clocks. Every run keeps its raw samples, build logs, compiler versions and source revision, and the losses are published with the wins. The methodology shows how to reproduce a run.

  • Level with C: double-precision float loops (1.00 to 1.04 of C's time), f32 matrix multiply on the H7 (1.01), multicore scaling on the S3 (1.94× with two workers, as C's), and 1 ms timers (p99 exactly 1,000 µs, idle or busy).
  • Ahead of C: CRC-32 (0.69 to 0.90), a stream of messages through a typed queue on the ESP32s (0.61 to 0.81), spawning a worker on the H7 (0.69), and timer wake-up while a worker computes, compared at default priorities.
  • Behind C: heapsort (1.9 to 2.1×), f32 matrix multiply on the ESP32s (1.3 to 1.4×, C's fused multiply-add), spawning a worker on the ESP32s (1.6 to 1.7×), queues on the H7 (2.3×), and image size (the suite's image is 45 KB larger than C's on the H7 and 94 to 96 KB on the ESP32s, against C's last full run, made before the pin benchmarks).

The benchmark report has every figure, before and after the performance work, with what it cost and what is left.

Verification

Every pull request to main must pass:

Check What it proves
Lint and unit tests the source fixes and version checks behave
32-bit host conformance Goose's samples, built with gcc -m32 through the full pipeline, match goose run
Firmware builds every example builds for every target
Emulated conformance each target's firmware, in QEMU, Renode or picoem, prints what the PC prints, and an overflow hits the hardware guard (not in picoem, which doesn't enforce the MPU)
Package the wheel installs, fetches Goose, and builds firmware
Docs this site builds with no broken links

Changes to ports or the runtime are also run on the physical boards, and each pull request says which. Along the way, this work found and documented a calling-convention bug in Xtensa GCC 15.2 (Findings) and fixed the correctness defects the benchmarks exposed (Benchmark findings). Known issues in other projects lists the bugs and design choices outside MicroGoose that it works around, and which are reported upstream.

Supply chain

  • Goose compiler: a fixed release (v2026.5), downloaded from its official GitHub release and refused unless its SHA-256 matches.
  • Toolchains: ESP-IDF and arm-none-eabi-gcc come through PlatformIO, with platform versions pinned in each platformio.ini. ESP-IDF registry components (mDNS, MQTT) are pinned to a compatible version range.
  • CI: GitHub Actions are pinned by commit SHA, Dependabot proposes updates, and main takes changes only through pull requests that pass CI.
  • Releases: PyPI packages are built in CI, smoke-tested, held for a manual approval, and published with Trusted Publishing, so no long-lived tokens exist. Version tags are protected.
  • Vendored code: LittleFS (BSD-3-Clause) and Monocypher (BSD-2-Clause or CC0), with their licences beside them in components/microgoose/third_party/.

Licensing

MicroGoose is licensed under the Apache License 2.0, which grants a patent licence from each contributor and lets you ship it in closed-source products. Keep the NOTICE file when you redistribute it.

The firmware a build produces also contains the Goose runtime (Apache-2.0, from the Goose project), ESP-IDF (Apache-2.0) or STM32Cube's HAL and FreeRTOS (BSD-3-Clause and MIT), and the vendored libraries above. Review those licences as you would for any firmware. MicroGoose is not affiliated with the authors of Goose; it downloads the compiler and does not redistribute it.

Evaluate it in a day

  1. No hardware (30 minutes). Install MicroGoose and an emulator (Espressif's QEMU for the ESP32), then run the starter program in it:

    pip install microgoose
    microgoose new hello
    microgoose run hello/main.goose --target esp32 --emulate
    

    If the install stops, or your shell can't find microgoose, see Getting started.

  2. On your board (1 hour). Run the same program with --target s3, esp32 or h7, then examples/overflow.goose to see the hardware guard stop a runaway data stack.

  3. Conformance (1 hour). From a checkout, run python tests/conformance.py --target s3 to diff Goose's samples on the board against the PC.
  4. Your peripheral (2 hours). Bind one of your own C drivers with an extern fn (Adding a binding), or use CAN, UART, I2C or SPI from import mcu;.
  5. Your numbers (2 hours). Run the benchmark suite on your board (Reproducing a run) and compare with the published results.
  6. Read the trade-offs. Feasibility findings and Benchmark findings list what doesn't work yet and why.

Getting involved

Questions, bug reports and board requests go to GitHub issues. Security reports go through the security policy. To add a board or a peripheral, see Contributing and Adding a board.