What is least number of dependencies needed for running a grpc C++ example?

48 views
Skip to first unread message

Prashant Shubham

unread,
Aug 27, 2018, 8:23:55 AM8/27/18
to grpc.io
I wanted to know what is the least number of dependencies needed for grpc. I want reduce the size of grpc example as low as possible. It's reduce by large if use protobuf-lite. How can I just install grpc_cpp_plugin and grpc++, grpc++_reflection without make of the whole grpc repo.

Nicolas Noble

unread,
Aug 29, 2018, 1:39:41 PM8/29/18
to grpc.io
You can make these individual targets if you want to avoid building the whole repository; the dependency tree should be properly set up for this. The other aspect as well is that the hello world example doesn't use SSL, so you can also reduce the overall list of dependencies by using the unsecure version of grpc instead as to not pull the OpenSSL / BoringSSL dependency.

Unfortunately for protobuf, you can't use protobuf-lite in the plugins, so grpc_cpp_plugin requires the full protobuf dependency. But you should indeed be able to tweak the example to use protobuf-lite instead for its own runtime.

The other important dependencies we have are:

zlib for the stream compression.
c-ares for the DNS resolver.
Reply all
Reply to author
Forward
0 new messages