Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web version #10

Open
TheYkk opened this issue Jul 18, 2022 · 9 comments
Open

Web version #10

TheYkk opened this issue Jul 18, 2022 · 9 comments

Comments

@TheYkk
Copy link

TheYkk commented Jul 18, 2022

I think It would be great to use this tool on the web with webassembly.

@egonelbre egonelbre added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Jul 18, 2022
@egonelbre
Copy link
Member

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.

@gedw99
Copy link

gedw99 commented Jul 25, 2022

@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

@egonelbre
Copy link
Member

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 golang/go#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.

@llindemann
Copy link

TinyGo might have sourcemap support, but I haven't checked.

Yes, it works with TinyGo (just checked)

@gedw99
Copy link

gedw99 commented Jul 29, 2022

@llindemann
Got a demo of this ?

@egonelbre
hackpadfs provides a file System in the browser itself . Does that help ?

@egonelbre
Copy link
Member

egonelbre commented Jul 30, 2022

@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
Copy link

llindemann commented Aug 1, 2022

@gedw99
Copy link

gedw99 commented Aug 1, 2022

Hey @llindemann
The article is really useful. I had no idea that debugging wasm was that easy in google chrome

@gedw99
Copy link

gedw99 commented Sep 29, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants