grpc-node/packages/grpc-tools
Michael Lumish 1d9887224b grpc-tools: Bump to version 1.13.0 2025-02-06 14:59:47 -08:00
..
bin Update maxBuffer limit to 100Mib 2018-03-26 09:40:20 -04:00
deps grpc-tools: Update protoc to v3.19.1 2022-10-26 20:30:52 +03:00
src Add omit_serialize_instanceof generator option 2025-01-09 05:59:04 -08:00
.gitignore Begin aarch64 support 2023-01-22 22:54:12 +00:00
CMakeLists.txt Fix CMake args 2023-01-30 23:10:07 +00:00
LICENSE Don't fill in any templates in LICENSE files 2019-03-06 11:01:44 -08:00
README.md Add omit_serialize_instanceof generator option 2025-01-09 05:59:04 -08:00
build_binaries.ps1 Build Windows x86 and x64 separately using a matrix 2020-05-15 10:43:25 -07:00
build_binaries.sh Begin aarch64 support 2023-01-22 22:54:12 +00: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.toolchain.cmake Fix CMake args 2023-01-30 23:10:07 +00:00
package.json grpc-tools: Bump to version 1.13.0 2025-02-06 14:59:47 -08: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.
  • omit_serialize_instanceof: Omit the instanceof check for messages in client code. This is useful when the message was renamed or is from a different package, and serialization would fail with Expected argument of type ….