Skip to content

Instantly share code, notes, and snippets.

@jjeffery
Last active October 9, 2023 08:41
Show Gist options
  • Save jjeffery/6e3a4d18ffbe1fc715be403f6391c5f4 to your computer and use it in GitHub Desktop.
Save jjeffery/6e3a4d18ffbe1fc715be403f6391c5f4 to your computer and use it in GitHub Desktop.
Installing grpc development environment for Windows

Notes on installing GRPC development environment for Go on Windows

Prerequisites:

  1. Go development environment installed.
  2. $GOPATH/bin
  • I tend to use git bash on my command line, so even though these notes are for Windows, the command line examples have a Unix flavour.
  • The directory names suit my Windows development machine, on which I have a D drive that I use for most of my development work.

Install protobuf

Downloads are at https://github.com/google/protobuf/releases. A binary package for win32 is available.

Unzip at D:\Programs\protobuf

Add D:\Programs\protobuf\bin to the path.

$ protoc --version
libprotoc 3.5.1

Install Go-specific protobuf plugin

go get -u github.com/golang/protobuf/protoc-gen-go

Install GRPC Gateway

If you want to use GRPC Gateway for a REST to GRPC reverse proxy:

go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
@lexuanquynh
Copy link

go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.

@lexuanquynh
Copy link

lexuanquynh commented Aug 1, 2023

 go get -u  "google.golang.org/protobuf"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment