Repository navigation
Compatibility
The GOOS=tamago target maintains full language and standard library support,
stdlib is tested using original distribution tests, status is tracked through a
tamago-go GitHub workflow:
Distribution tests are executed under the default implementation for
runtime/goos
which provides standard Linux system calls bridge for GOOS=tamago under Linux
on amd64/arm/arm64/loong64/riscv64 architectures.
The following test runs can be executed within a built
TamaGo compiler
on native Linux or under cross-compilation, with the relevant GOARCH override, as supported by
qemu-user-static via binfmt_misc.
Standard distribution tests:
GO_BUILDER_NAME=tamago GOOS=tamago bin/go tool dist test
##### Testing packages.
ok archive/tar 0.098s
ok archive/zip 0.054s
ok bufio 0.033s
...
ok crypto/x509 0.226s
ALL TESTS PASSED
Individual package(s):
GOOS=tamago bin/go test -tags fakenet runtime net crypto/tls
ok runtime 2.504s
ok net 0.862s
ok crypto/tls 0.218s
Note
the fakenet tag is required for testing individual packages making network API calls,
Warning
runtime flags (e.g. -run) are ignored due to lack of os.Args support
under bare metal, for this reason -test.short is always assumed
Most applications and libraries are not limited under GOOS=tamago, the
following caveats apply:
-
Asynchronous preemption for Goroutines is not supported (just like js/wasm/plan9). For this reason scheduler starvation should be avoided.
On single-core platforms, just like Go js/wasm, blocking functions which are not executed in a new goroutine, while no other goroutine is running, will cause a deadlock (similar to this and this). As long as you never sleep in your main function without anything else going on this is quite natural to avoid.
On multi-core platforms (currently only amd64) scheduler starvation might happen in the unlikely scenario every core is busy processing an unpreemptible loop. If such case is a concern an interrupt service routine, handling a timer can be used to serve as watchdog.
-
Due to the intrinsic nature of a bare metal application: there is no OS, there are no users, there are no signals, there are no environment variables. These are intended to be seen as feature, rather than limitations.
-
Applications which import packages that rely on unsupported system calls may not compile or work as expected (for instance terminal prompt packages will not be able to access
syscall.SYS_IOCTL). -
Cgo is not supported.
-
On
GOOS=armcare must be taken with direct or indirect (e.g. dependencies) use of the atomic package due to the last of these bugs. This is a generic Go issue not specific to TamaGo but possible on the supported 32-bit target.
- Cloud Hypervisor: cloud_hypervisor/vm
- QEMU microvm: qemu/microvm
- Firecracker microvm: firecracker/microvm
- UEFI: uefi/x64
- Google Compute Engine: google/gcp
- USB armory: usbarmory
- MCIMX6ULL-EVK: mx6ullevk
- 8MPLUSLPD4-EVK: imx8mpevk
- EVB-LAN9696-24Port: lan969evb
- Raspberry Pi: pi
- NuMaker-IIoT-NUC980G2: nuc980iiot
- AI Foundry Erbium: erbium_emu
- AI Foundry ET-SoC-1: sys_emu
- MilkV Vega: vega
- Nuclei QEMU: eval_soc
- SiFive Unleashed: sifive_u
- QEMU virt: virt
- AMD/Intel 64-bit: amd64, intel
- NXP i.MX6UL: imx6ul
- NXP i.MX8MP: imx8mp
- Microchip LAN969x: lan969x
- BCM2835: bcm2835
- Nuvoton NUC980: nuc980
- AI Foundry Erbium: erbium
- AI Foundry ET-SoC-1: etsoc1
- Fisilink FSL91030: fsl91030
- SiFive FU540: fu540
- Loongson 3A5000: ls3aa5000