Hi, I’m not sure there’s much TinyGo action here but I’m struggling to find help and the TinyGo channel on gophers slack is rather quiet.
I’m looking for advice, suggestions, warnings etc about attempting to port a Golang project (git-bug which has lots of deps) to TinyGo Is this a bad idea? Are there any other places to look than the gophers slack, here and tinygo.org?
The firs thing I though was to try building to see how that goes and check for missing dependencies, but the command tinygo build -o git-bug in a newly cloned git-bug repo downloads the dependencies and then fails immediately with:
build github.com/MichaelMure/git-bug: cannot load runtime/debug: malformed module path "runtime/debug": missing dot in first path element
I can’t find ‘runtime/debug’ anywhere in the repo so I’m stuck at the moment and looking for blogs and people to ask, with not much luck so far.
Someone suggested I use TinyGo as a way to reduce the bundle size for a WASM build. I don’t know by how much at this point, but thought it might be worth investigating TinyGo first.
Apparantly Go WASM output is large because the whole runtime is needed due to lack of support for garbage collection.
I see. Just to cross-check before you use my tip, have you attempted their official guidelines? Getting Started | TinyGo
Per my understanding, tiny-go is like a Go compiler (see: https://tinygo.org/usage/basic/). Obviously, you don’t need to compile from scratch.
EDIT: I forgot to tell you, remember to read this before use: Go language features | TinyGo. Not all features are supported yet (they are working on it).
I just searched around a bit on tinygo’s Github page and found this, so it looks like this may be one of the known current limitations of tinygo’s runtime implementation.