3 ms·
Shouldn't be too hard to make a library that would allow this. Would you be interested in that ? So let's say something like the following example, would you us
by candiodari 6y ago
Shouldn't be too hard to make a library that would allow this. Would you be interested in that ? So let's say something like the following example, would you use it?
This should be possible:
<script src="some.url/gopherjs.js">
<script type="application/golang">
package main
import "fmt"
func main() {
fmt.Printf("yeah baby\n") // Effectively console.log
}
</script>
Obviously this would take more than a bit of time to start up (seconds), but the idea is of course that you don't do this once you deploy to production, and replace by inline webassembly.
- TekMol 6y agoI would surely try it out! What is "inline webassembly"?
- candiodari 6y agoWebAssembly.instantiate(new Uint8Array([0,97,115,109,1,0,0,0,....], { type: 'application/wasm' }); Inline webassembly = directly specifying the wasm binary inside of the html or javascript file.