TinyGo

TinyGo

TinyGo - A Go Compiler For Small Places Get Started Try TinyGo See the code Go on embedded systems and WebAssembly TinyGo brings the Go programming language to embedded systems and to the modern web by creating a new compiler based on LLVM. You can compile and run TinyGo programs on over 150 different microcontroller boards from maker boards such as the BBC micro:bit and the Arduino Uno, to industrial processors from Nordic Semiconductor and ST Microelectronics.

访问网站
我的收藏195 次访问更新于 25 days ago反馈
TinyGo screenshot

详细介绍

TinyGo 简介

TinyGo 是一个面向“小地方”的 Go 语言编译器,基于 LLVM 构建,旨在将 Go 编程语言带到嵌入式系统与现代 Web 环境中。

TinyGo Logo

主要功能

  • 嵌入式系统支持:可编译并运行在超过 150 种不同微控制器板上,涵盖 BBC micro:bit、Arduino Uno 等创客板,以及 Nordic Semiconductor、ST Microelectronics 等工业处理器。
  • WebAssembly 支持:能够生成体积非常紧凑的 WebAssembly(WASM)代码,可编译供 Web 浏览器使用的程序,也支持使用 WebAssembly System Interface(WASI)系列接口的服务器与边缘计算环境。
  • 在线试用与学习:提供 TinyGo Playground 用于在线试用与模拟设备自由练习,并提供 TinyGo Tour 用于了解更多信息。
  • 开源与社区:项目代码托管于 GitHub,同时可在 Mastodon 上加入社区交流。

适用场景

  • 在资源受限的微控制器和嵌入式设备上使用 Go 语言进行开发,如点亮 LED、控制 RGB 灯、驱动显示屏等。
  • 需要生成小巧的 WebAssembly 模块,用于浏览器端程序或支持 WASI 的服务器及边缘计算场景。
  • 希望在不安装本地工具链的情况下,通过在线 Playground 快速体验或教学 TinyGo 开发。

快速体验

TinyGo 官网上提供了“Hello world”、Arduino Uno 闪烁 LED、Adafruit Circuit Playground Express 的 RGB LED、Gopher Badge 显示等示例,并可在 TinyGo Playground 中直接编辑和运行代码。