Hacker News
TinyGo 0.45.0
donatj
|next
[-]
Way saner than the C pico projects I've helped my friend work on.
Maybe it's just me but I kind of wish there was more of a way to clearly differentiate a Go project from a Tiny Go project, like .tgo file extensions or like a "compiler tinygo" directive in go.mod or something.
dofm
|next
|previous
[-]
I have some Go experience (a small utility used by some dozens of quite niche customers) and trivial experience of macOS development.
So far my two projects have been Go/Gin/goose etc. — a web app — and a small desktop Swift app. But there's GUI stuff for Go and web stuff for Swift. (I could have written my mac app exactly in Golang because there's a package that does what I need)
I had hoped I would find that one of these languages was clearly better than the other. Go is obviously better for the LLM, maybe a bit tiresome to see enormous reams of it for me. Swift is a little harder on the LLM (and it builds more slowly) but it's a bit easier on the eye; I've been very productive in it.
Here, again, it will be hard to separate TinyGo and Embedded Swift.
And there's WASM support for both.
ghoul2
|next
|previous
[-]
KingOfCoders
|next
|previous
[-]
rcarmo
|root
|parent
|next
[-]
logicallee
|root
|parent
|previous
[-]
wffurr
|root
|parent
|next
[-]
GOOS=js GOARCH=wasm tinygo build -o wasm.wasm ./main.go
https://tinygo.org/docs/guides/webassembly/wasm/It relies on LLVM’s Wasm backend and some JS glue libraries for the browser.
KingOfCoders
|root
|parent
|next
|previous
[-]
logicallee
|root
|parent
|previous
[-]
KingOfCoders
|root
|parent
[-]
01HNNWZ0MV43FF
|root
|parent
|previous
[-]
Yes, wasm can do that.
You can compile the code to wasm, then run it in a runtime like wasmer or wasmtime. Or you can ahead-of-time compile it with something like wasm2c, which generates C code.