Build to wasm with Tinygo #1433
-
I am able to build my program to web assembly with Go, but when trying the same with Tinygo the build fails. I'm using Go 1.15.6, and Tinygo 0.16.0 This is the error I'm getting in the log on the failed build.
I'm new to much of this and learning as I go, I'm just curious if this is a problem of my setup or a limitation of the tools I'm using. I am getting successful tinygo builds when the go program is not importing Ebiten. And I've been unsuccessful in finding solutions just by googling the error. I hope this is the right place to ask this. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
https://tinygo.org/lang-support/stdlib/#encoding-asn1 Actually, now I might found the answer to my own question. I had missed this when searching last night. I guess now my question would be is there interest or intention to make Ebiten compatible with tinygo for the purposes of build sizes suitable for web hosting? |
Beta Was this translation helpful? Give feedback.
-
This is a known issue. Ebiten cannot be built with TinyGo yet. tinygo-org/tinygo#1304 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I was also starting to take a look at Tinygo. Ebiten is nice for it's simplicity and portability, but the default wasm export is big ... even just a look at the recent game jam, all the game with a web export take a good ~10s to load.
GoThe default rotate example produce out of the box a WASM file which is like ~9MB.
This build work fine, but still a bit heavy for a single 30KB rotating image without any audio TinyGoSo I gave a try to tinygo, the build run fine, the default export is 2.1MB and with the same optimization and compression than before I get it to 449KB (only 5% of the original wasm size).
So it seem to be promising to have ebiten games under 1MB, but I guess it's still not ready yet 😢 |
Beta Was this translation helpful? Give feedback.
This is a known issue. Ebiten cannot be built with TinyGo yet. tinygo-org/tinygo#1304