brew install asdf
Then add asdf
in the plugin list on ~/.zshrc
(if you use oh-my-zsh)
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs 18.12.1
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
asdf install golang 1.19.5
echo "nodejs 18.12.1" >> ~/.tool-versions
echo "golang 1.19.5" >> ~/.tool-versions
GOOS=js GOARCH=wasm go build -o knapsack