You can use Wasmer in your Go projects to execute WebAssembly modules securely and conveniently.
In this section we will go through the instructions on how to setup your Go environment, to then visit different examples of how to use Wasmer in Go.
To be able to run Wasmer inside our Go application, we will need Go to be installed in our system.
To ensure it is installed, let's run the following:
go version # This will display the Go version
If this command work, Go is successfully installed!
Now it's time to create a new project and add Wasmer as a dependency:
go mod init github.com/$USER/wasmer-project
Now, edit the
go.modfile to add
wasmer-goas a dependency:
Next, let's take a look at some examples!