TinyGo ke pokello ea puo ea Go e reretsoeng ho sebelisoa libakeng tse kang li-microcontroller, WASM, le nts'etsopele ea lisebelisoa tsa taelo.
TinyGo e sebelisa lisebelisoa le lilaeborari tse ngotsoeng morerong oa Go, ha e ntse e fana ka mokhoa o mong oa ho hlophisa mananeo a ipapisitseng le mosebetsi oa morero oa LLVM.
Lipheo tsa morero:
- Netefatsa boholo ba bonyane ba lifaele tse phethiloeng.
- E ts'ehetsa palo e kholo ea li-microcontroller.
- Tšehetso ea WebAssembly.
- Ts'ehetso e ntle ea CGo.
- Tšehetso ea khoutu ea Go ea pele ntle le liphetoho.
Mohlala oa tšebeliso ea ho chencha LED ho microcontroller:
sephutheloana se seholo
kenya (
"mochini"
"nako"
)
monate oa func () {
led := mochini.LED
led.Configure(mochine.PinConfig{Mode: mochini.PinOutput})
bakeng sa {
led. Tlase()
nako.Robala(nako.Millisecond * 1000)
led.Hodimo ()
nako.Robala(nako.Millisecond * 1000)
}
}
Mofuta oa 0.6.0 o na le liphetoho tse ngata. Tse ka sehloohong li amana le tšehetso e ntlafetseng bakeng sa CGo, js.FuncOF (Go 1.12+), hammoho le liboto tse peli tse ncha tsa ntlafatso: Adafruit Feather M0 le Adafruit Trinket M0.
Lethathamo le felletseng la liphetoho le fumaneha ho Leqephe la morero oa GitHub.
Source: linux.org.ru