xref: /aosp_15_r20/external/grpc-grpc/include/grpcpp/impl/codegen/README.md (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1*cc02d7e2SAndroid Build Coastguard Worker# Welcome to `include/grpcpp/impl/codegen`
2*cc02d7e2SAndroid Build Coastguard Worker
3*cc02d7e2SAndroid Build Coastguard Worker## Why is this directory here?
4*cc02d7e2SAndroid Build Coastguard Worker
5*cc02d7e2SAndroid Build Coastguard WorkerThis directory exists so that generated code can include selected files upon
6*cc02d7e2SAndroid Build Coastguard Workerwhich it depends without having to depend on the entire gRPC C++ library. This
7*cc02d7e2SAndroid Build Coastguard Workeris particularly relevant for users of bazel, particularly if they use the
8*cc02d7e2SAndroid Build Coastguard Workermulti-lingual `proto_library` target type. Generated code that uses this target
9*cc02d7e2SAndroid Build Coastguard Workeronly depends on the gRPC C++ targets associated with these header files, not the
10*cc02d7e2SAndroid Build Coastguard Workerentire gRPC C++ codebase since that would make the build time of these types of
11*cc02d7e2SAndroid Build Coastguard Workertargets excessively large (particularly when they are not even C++ specific).
12*cc02d7e2SAndroid Build Coastguard Worker
13*cc02d7e2SAndroid Build Coastguard Worker## What should user code do?
14*cc02d7e2SAndroid Build Coastguard Worker
15*cc02d7e2SAndroid Build Coastguard WorkerUser code should *not* include anything from this directory. Only generated code
16*cc02d7e2SAndroid Build Coastguard Workerand gRPC library code should include contents from this directory. User code
17*cc02d7e2SAndroid Build Coastguard Workershould instead include contents from the main `grpcpp` directory or its
18*cc02d7e2SAndroid Build Coastguard Workeraccessible subcomponents like `grpcpp/support`. It is possible that we may
19*cc02d7e2SAndroid Build Coastguard Workerremove this directory altogether if the motivations for its existence are no
20*cc02d7e2SAndroid Build Coastguard Workerlonger strong enough (e.g., if most users migrate away from the `proto_library`
21*cc02d7e2SAndroid Build Coastguard Workertarget type or if the additional overhead of depending on gRPC C++ is not high).
22