tinygo
tinygo copied to clipboard
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
This has been requested before in #1037 and it is necessary for using the stdlib testing package. I have compared the code size before and after and except for very...
This is a general question and I'm posting it here because I don't see a discussion forum anywhere. Apologies in advance. How does one handle errors from TinyGo programs? For...
As the title says, setting a variable with -ldflags="-X ''" doesn't seem to work if the target is set to wasm I've tried it with a simple example: ```go package...
Or really, it's more of a workaround, by simply disabling the tests that can't run, as mentioned in #2824.
Using today's dev branch plus a fix for #2799, on a (relatively) freshly set up windows 11 system, compress/lzw seems to fail on wasi: ``` $ ~/src/tinygo/build/tinygo test -target wasi...
``` $ tinygo run ./src/examples/serial ld.lld: warning: duplicate /export option: hypot ld.lld: warning: duplicate /export option: nextafter hello world! hello world! hello world! hello world! $ tinygo version tinygo version...
**main.go** ```go package main // Clone is copied from golang.org/x/exp/slices package. func Clone[S ~[]E, E any](s S) S { // Preserve nil in case it matters. if s == nil...
Call parameter type does not match function signature! when method input parameter is a generic type
**main.go** ```go package main type C[V any] struct{} func (c *C[V]) F(v N[V]) {} type N[V any] struct{} func main() { var c C[int] var n N[int] c.F(n) } ```...