Is it possible to build grpc for server/client only?

163 views
Skip to first unread message

Karol Bisztyga

unread,
Aug 27, 2021, 6:55:00 AM8/27/21
to grpc.io
Hey!
I'm building grpc c++ for android and I noticed a significant increase in the build folder's size. Is there any way I can reduce that? On android I only want to use grpc client, the server is remote, so is it possible to build the grpc for the client only? I know [you implemented generating code in such a manner](https://github.com/grpc/grpc/pull/6284) but that's just generating. I've noticed, in examples you have to include `#include <grpcpp/grpcpp.h>` so it looks like that may be not possible.

The size of the build folder with grpc is 4.5GB.
Without it - 323MB.


I also tried to pass the following flags to `cmake`:
```
-DgRPC_BUILD_CSHARP_EXT=OFF \
-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF \
-DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF \
-DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF \
-DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF \
-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF \
-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF \
-DgRPC_BUILD_TESTS=OFF \
```
and it saved ~15MB of the disk space, but it's still too much.

Am I doing something wrong? I used those two examples when working on this:

Is there a better way to build this on android?
Thanks!
Reply all
Reply to author
Forward
0 new messages