Downloading and installing protoc
Important note
For Windows users, I highly recommend you install protoc
by using a package manager such as Chocolatey (https://chocolatey.org/) or any other one you want. Installing protoc
header files is tricky, but they are necessary for getting Well-Known Type definitions. For Chocolatey, you should be able to run the following command:
$ choco install protoc
Before even thinking about all the code generation and serialization, we need to install the compiler. Depending on your needs, there are multiple ways of doing this. I am going to show two. The first one is downloading protoc
from the GitHub Releases page (https://github.com/protocolbuffers/protobuf/releases), and the second one is installing from a tool such as curl
or wget
.
GitHub Releases page
There, you will have a list of different precompiled binaries for different platforms (Linux, macOS) and for different architectures (arm, x86). For a given version, you will have a...