tinygo: A Go compiler for microcontrollers, WebAssembly, and command-line tools.
What problem it solves
Go programs often need to run in environments with limited resources, including microcontrollers and WebAssembly runtimes. TinyGo provides a way to compile Go source for these small systems while retaining the Go language, memory model, and broad standard-library support.
Key features
Microcontroller targets — TinyGo can compile programs for many microcontroller boards and produce firmware in target-specific formats such as .elf, .hex, and .uf2.
Source: README
WebAssembly and WASI support — Programs can target browsers, servers, edge devices, and other environments that run WebAssembly. TinyGo supports both WASM and WASI targets.
Source: README
Standard operating system targets — The compiler can also target programs running on Linux, macOS, and Windows.
Source: README
Go language compatibility — TinyGo aims to compile most Go code without modification and support most standard-library packages.
Source: README
LLVM-based compilation — The compiler uses LLVM internally and reuses libraries from the Go language tools to compile programs written in Go.
Source: README
Quick start
Copied verbatim from the project's README.
package main
//go:wasmexport add
func add(x, y uint32) uint32 {
return x + y
}tinygo build -buildmode=c-shared -o add.wasm -target=wasip1 add.goWho it may suit
Inference: TinyGo may suit Go developers targeting microcontrollers, WebAssembly hosts, edge devices, or small command-line programs. It may also suit contributors interested in compilers, runtimes, and embedded systems.
Topics to discuss
Which target areas should receive more board support, tooling, or documentation?
Which Go language or standard-library features are most important to add next?
How should the community improve the experience of testing and contributing to TinyGo?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/tinygo-org/tinygo#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…