Web version
I think It would be great to use this tool on the web with webassembly.
This implementation depends on being able to access source code and the binary. While uploading the binary is a trivial change, however accessing the local disk -- not so much. It'll be probably easier to run the program locally and use it that way.
I'm not against someone adding it, but I don't see a reason to add it myself.
@TheYkk i agree that seeing the wasm matching the golang is really useful . Especially to see the output on tinygo compared to the standard golang wasm compiler.
I think that running it locally on your desktop should be the initial scope so that it’s easy to access local disk.
later we can use hackpadfs ( a web based file system weiten in golang ) to access the source and wasm in a browser .
let me know if desktop is suitable for phase 1
Sure, WebAssembly support definitely would be nice.
However, for supporting wasm you need a way to get source-line mapping... and AFAIK, Go doesn't emit dwarf/line-info https://github.com/golang/go/issues/33503
TinyGo might have sourcemap support, but I haven't checked.
So the first step would be to add necessary support for them.
Hackpadfs seems rather large dependency and I wouldn't want to pull it in. It also doesn't seem to solve the problem of accessing the data.
TinyGo might have sourcemap support, but I haven't checked.
Yes, it works with TinyGo (just checked)
@llindemann Got a demo of this ?
@egonelbre hackpadfs provides a file System in the browser itself . Does that help ?
@gedw99 the issue of getting data to the program isn't about having a filesystem, it's about uploading and/or binding to the local filesystem.
@llindemann Got a demo of this ?
@gedw99 Yes, here: https://blog.noops.land/debugging-webAssembly-from-go-sources-in-chrome-devtools
Hey @llindemann The article is really useful. I had no idea that debugging wasm was that easy in google chrome
I can confirm that tinygo def has DWARF support. Been using it for debug info for a few days.
https://github.com/emad-elsaid/debugger