go-wasm-http-server
go-wasm-http-server copied to clipboard
[FEATURE] Use wasmexport/wasmimport build tags
Go now supports directives to import and export functions to/from the compiled wasm binary, see documentation.
This directives could be used to simplify how go-wasm-http-server interacts with the browser.
wasmimport is available since Go 1.22 and wasmexport is available since Go 1.24.
It would be nice to keep backward compatibility with Go 1.22, hence be able to work without wasmexport.
@nlepage hey i would like to work on this issue can i work on this?
@nlepage hey i would like to work on this issue can i work on this?
Yes of course. Please ask me if you have any question.
In go 1.24 the location of wasm -exec. No js changed btw.
So this breaks , and others in this repo.
@gedw99 The link used in https://github.com/nlepage/go-wasm-http-server/blob/master/docs/hello-sse/sw.js and other examples contains Go’s version (https://cdn.jsdelivr.net/gh/golang/[email protected]/misc/wasm/wasm_exec.js), so it should not break.
However your’re right, examples and documentation will need to be updated with the new location in order to comply with Go 1.24.