chore: update protobuf * gRPC toolchains
This commit is contained in:
@@ -10,16 +10,28 @@ See [API documentation](..\docs\apis.md)
|
||||
|
||||
##### Installling tools
|
||||
|
||||
Download the [Protocol Buffers compiler](https://github.com/protocolbuffers/protobuf/releases) (protoc-3.11.4-*) for your platform and add `protoc` to `PATH` environment variable
|
||||
Download the [Protocol Buffers compiler](https://github.com/protocolbuffers/protobuf/releases) (protoc-3.13.0-*) for your platform and add `protoc` to `PATH` environment variable
|
||||
|
||||
For generating Go code:
|
||||
For generating Go code, install `protoc-gen-go` (v1.32.0):
|
||||
```bash
|
||||
GIT_TAG="v1.4.0"
|
||||
go get -d -u github.com/golang/protobuf/protoc-gen-go
|
||||
git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout $GIT_TAG
|
||||
go install github.com/golang/protobuf/protoc-gen-go
|
||||
GIT_TAG="v1.32.0"
|
||||
go get -d -u google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
git -C "$(go env GOPATH)"/src/google.golang.org/protobuf checkout $GIT_TAG
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
```
|
||||
(Update to google.golang.org/protobuf when https://github.com/grpc/grpc-go/pull/3435 resolves)
|
||||
|
||||
Also install `protoc-gen-go-grpc`:
|
||||
```bash
|
||||
go get -u google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
```
|
||||
|
||||
Or install using [gobin](https://github.com/myitcv/gobin):
|
||||
```bash
|
||||
gobin google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
gobin google.golang.org/grpc/cmd/protoc-gen-go-grpc
|
||||
```
|
||||
|
||||
For generating HTTP JSON APIs with [grpc-gateway](https://grpc-ecosystem.github.io/grpc-gateway/), follow the [documentation](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2#installation).
|
||||
|
||||
For generating Java code: From `bdledger-sdk-java` run `gradle generateProto`
|
||||
|
||||
@@ -50,7 +62,7 @@ References:
|
||||
|
||||
Run:
|
||||
```bash
|
||||
./scripts/gen [-a, --async] [go] [nodejs] [ts] [docs]
|
||||
./scripts/gen [-a, --async] [go] [gohttp] [nodejs] [ts] [docs]
|
||||
```
|
||||
Use `-a` or `--async` to speed up generation by asynchronously and concurrently generating all code and documentation (script will exit without waiting for completion)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user