WebAssembly was truly a success in the first quarter of 2018, the first native JavaScript alternative since the birth of the Web. Now, Go language also announced to add js/wasm architecture! Adding support for Golang on the Wasm platform will be added to a series of commits to the golang code base. The first part of the series was released on March 31, 2018, to add WebAssembly as an architectural goal to the Go language.
The software package is divided into multiple parts. The GOARCH name of the platform is wasm, and the js of the GOOS assignment is added. This means that the compiled binary file will run in the browser JavaScript environment and the Node.js server-side environment.
By Carlos Baraza [CC0], from Wikimedia Commons
Golang applications compiled as wasm will be interoperable with JavaScript applications. This means that the Wasm architecture of WebAssembly will be largely accessed and embedded from within JavaScript.
In addition, the foundation for running Golang on the Wasm architecture includes many technical specifications. Among them are memory management, 32/64-bit architecture features, threads, garbage collection, and details of interoperating with JavaScript.
Please check the online documentation for details: WebAssembly architecture for Go