Best practice for dependency modelling in a bazel C++ project?
10:22 16 Dec 2025

I try to figure out a best practice for modelling the dependencies in bazel for a c++ project. Is there anything wrong in the following rules?

  • [implementation_deps]: (only available for cc_library) use this for all static linked libraries

  • [dynamic_deps]: use this for all dynamically linked libraries

  • [deps]: use this for transitive dependencies or static dependencies in binaries

  • [data]: don't use this for C++ library dependencies

Are there any use-cases where it is useful to differ from these best practice?

c++ bazel bazel-cpp