Hacker News new | past | comments | ask | show | jobs | submit login

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.



I would surely try it out!

What is "inline webassembly"?


    WebAssembly.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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: