grpc-node/packages/grpc-tools
Michael Lumish 661fae88c6 grpc-tools: make the plugin compatible with proto3 optional fields 2021-03-22 11:40:23 -07:00
..
bin Update maxBuffer limit to 100Mib 2018-03-26 09:40:20 -04:00
deps grpc-tools: Bump protobuf dependency to 3.15.6 2021-03-16 13:43:53 -07:00
src grpc-tools: make the plugin compatible with proto3 optional fields 2021-03-22 11:40:23 -07:00
CMakeLists.txt grpc-tools: Add compiler flag to fix error on Mac 2020-06-22 10:57:41 -07:00
LICENSE Don't fill in any templates in LICENSE files 2019-03-06 11:01:44 -08:00
README.md Bump grpc-tools to 1.9.0 and add a README 2020-05-12 14:04:57 -07:00
build_binaries.ps1 Build Windows x86 and x64 separately using a matrix 2020-05-15 10:43:25 -07:00
build_binaries.sh Add grpc-tools build GitHub Workflow 2020-05-14 11:16:30 -07:00
copy_well_known_protos.js Adding missing license on a bunch of source files. 2019-03-19 01:06:57 +01:00
index.js Move grpc-tools and grpc-health-check into the packages directory 2017-09-11 18:14:37 -07:00
linux_32bit.toolchain.cmake Add build files for grpc-tools and tests for those builds 2019-02-06 14:53:37 -08:00
linux_64bit.toolchain.cmake grpc-tools: Force 64 bit Linux build 2019-02-20 14:56:05 -08:00
package.json grpc-tools: make the plugin compatible with proto3 optional fields 2021-03-22 11:40:23 -07:00

README.md

grpc-tools

This package distributes the Protocol Buffers compiler protoc along with the plugin for generating client and service objects for use with the Node gRPC libraries.

Usage

This library exports the grpc_tools_node_protoc executable, which accepts all of the same arguments as protoc itself. For use with Node, you most likely want to use CommonJS-style imports. An example of generating code this way can be found in this guide. The grpc_tools_node_protoc automatically includes the Node gRPC plugin, so it also accepts the --grpc_out=[option:]path argument. The option can be one of the following:

  • grpc_js: Generates code with require('@grpc/grpc-js') instead of require('grpc')
  • generate_package_definition: Generates code that does not require any gRPC library, and instead generates PackageDefinition objects that can be passed to the loadPackageDefinition function provided by both the grpc and @grpc/grpc-js libraries.