tiny go

In this post, we will see how to setup TinyGo on windows 10

Ok! where are we starting from?

First we need to install linux! Ubuntu in this case.

Wait what? Wasn’t this a windows tutorial?

Yes, but tiny go works only on Linux so we’ll need a Linux runtime

So, I need to install Linux on my windows? do I have to use a Virtual Machine?

You can use a VM, but in this tutorial, we will use the windows subsystem for Linux, you can find all you need at this link, follow the process of installation and meet me there when you are done

Done! I installed ubuntu on my windows

Good! now you need to install Go on this subsystem, to do so, start by typing these to commands

sudo apt-get update
sudo apt-get -y upgrade

Then go to this link and copy the url of the linux installer (*tar.gz), and paste it after curl -O, so your next command on the linux console will look like this

curl -O https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz

In this case the version is 1.12.6

Ok now I have the compressed file, how do I decompress it?

You need to decompress it in the /usr/local folder, to do it use this commands:

tar -xvf go1.12.6.linux-amd64.tar.gz

make sure to use the same name as your pakage to decompress it, once this is done, move the package to /usr/local

sudo mv go /usr/local

now set the gopath using this command

export PATH=$PATH:/usr/local/go/bin

Ok now I have WSL and Go, can we start doing some TinyGo?

To have the up to date commands use this link, install tiny go with the following commands

wget https://github.com/tinygo-org/tinygo/releases/download/v0.6.0/tinygo_0.6.0_amd64.deb
sudo dpkg -i tinygo_0.6.0_amd64.deb

Now set the path

export PATH=$PATH:/usr/local/tinygo/bin


Yes! TinyGo is ready, the next time we’ll see how to build a Go file into a wasm file

One thought on “Setup TinyGo on Windows 10

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.