ebiten
ebiten copied to clipboard
Try TinyGo
https://github.com/aykevl/tinygo
Would this specifically be for the WebAssembly target?
Yes, that's right :-)
There is now an llvm
formula for use by tinygo
under macOS here: https://github.com/tinygo-org/homebrew-tools (The mainline llvm
formula does not support the wasm target as of yet)
Will report back if I get it compiled and working with tinygo.
The installation instructions should probably be something like this though:
brew tap tinygo-org/tools
brew install tinygo-org/tools/llvm
https://github.com/trashhalo/tinygo-import-report Hmm
Note that thetinygo-import-report
was updated 6 months ago, and a lot has happened in TinyGo since.
I was wondering how I can know the latest situation.
It looks like https://github.com/trashhalo/tinygo-import-report/blob/master/report.go is used to generate a new report in the README.
The easiest way to try TinyGo is using Docker:
docker pull tinygo/tinygo:latest
docker run --rm -v $(pwd):/src -w /src tinygo/tinygo:latest tinygo build -o wasm.wasm -target=wasm -tags=example ./examples/rotate
EDIT: LOL, this finishes silently but without dumping anything.
https://github.com/tinygo-org/tinygo/issues/1304
The last issue I had trying to build an wasm ebiten app with tinygo was https://github.com/tinygo-org/tinygo/issues/2236
But tinygo/tinygo-dev:latest
seems to now fix the build.
Then we should use this wasm_exec.js
file to skip a runtime error : https://github.com/tinygo-org/tinygo/blob/release/targets/wasm_exec.js
And after that, I personally fall on this issue: https://github.com/tinygo-org/tinygo/issues/1037
I don't know if it's the same for you
Update as of today (ebiten 2.3.1, tinygo 0.23)
On Windows
❯ tinygo run .\cmd\app\main.go
# github.com/hajimehoshi/ebiten/v2/internal/glfw
..\..\..\go\pkg\mod\github.com\hajimehoshi\ebiten\[email protected]\internal\glfw\notexternaldll_windows.go:51:22: UserCacheDir not declared by package os
On Linux
❯ tinygo run .\cmd\app\main.go
# os/user
../../../../usr/lib/go/src/os/user/cgo_lookup_unix.go:18:6: not implemented: build constraints in #cgo line
Seems to be issue https://github.com/tinygo-org/tinygo/issues/770
I think there is no action item from Ebitengine side.