go-blueprint
go-blueprint copied to clipboard
[Feature Request] Add wasm support to run command in browser
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
- [X] I agree
@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
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
Do you want to take a crack at it and make a PR into the htmx repo I linked?
Because the code belongs to different repositories, it may be that I have to create two PRs to add support.
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.