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

[Feature Request] Add wasm support to run command in browser #264

Open
1 task done
Zxilly opened this issue Jun 18, 2024 · 5 comments
Open
1 task done

[Feature Request] Add wasm support to run command in browser #264

Zxilly opened this issue Jun 18, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Zxilly
Copy link

Zxilly commented Jun 18, 2024

Tell us about your feature request

Currently we have a web page https://go-blueprint.dev/, but it only provides a command line suggestion. We can compile the project to wasm then intergrate it to the web page, which allow user download a zip file or even directly write to the disk with File System API

Disclaimer

  • I agree
@Zxilly Zxilly added the enhancement New feature or request label Jun 18, 2024
@briancbarrow
Copy link
Collaborator

@Zxilly do you have experience doing this? I haven't really done it before but can look into it. Here is the repo for the web page. https://github.com/briancbarrow/go-blueprint-htmx

@Zxilly
Copy link
Author

Zxilly commented Jun 18, 2024

Yes, I implemented a wasm based application on https://gsa.zxilly.dev/, which normally doesn't require much extra code for implementation.
But in order to build wasm automatically, a much more complex build process is needed.
The main code is at https://github.com/Zxilly/go-size-analyzer/blob/master/cmd/wasm/main_js_wasm.go

@briancbarrow
Copy link
Collaborator

Do you want to take a crack at it and make a PR into the htmx repo I linked?

@Zxilly
Copy link
Author

Zxilly commented Jun 19, 2024

Because the code belongs to different repositories, it may be that I have to create two PRs to add support.

@Zxilly
Copy link
Author

Zxilly commented Jun 19, 2024

I've read through some of the code and the current implementation requires a lot of code changes to implement wasm support. I don't have that much time at the moment, I'll come back and see if I can move forward with this when I have more free time.

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

No branches or pull requests

2 participants