Open walkacross opened 2 years ago
Previously, we were seriously considering using cmake instead of bazel to build the open-source version of envpool. A fun fact is that the first internal version of envpool is built with cmake. However, after spending some time developing envpool in c++, we finally realized it's a huge benefit to use bazel instead of cmake for other integration. Here are the reasons:
Overall, in our opinion, bazel can do what cmake can do, and can also do what cmake can't do. So that's why we choose bazel for the open-source release instead of continuing using cmake. We are also using C++, and we don't think it's a sacrifice for C++ user experience -- otherwise, why Google uses bazel instead of cmake in all its product?
hi there @Trinkle23897 , thanks for your quick and detail feedback.
I see the advantage of using bazel, specially in saving a lot of time for CI. what I'm wondering is can envpool do something further to improve the eas of use in c++ environment, considering cmake is the mainstream build system, which migh further enhance the envpool impact.
for example.
envpool can provide a tutorial for usrs how to use envpool(built by bazel) in a cmake project.
like grpc and tensorflow-lite, support bazel and cmake simultaneously, which may increase the maintenance burden.
I see. This is definitely worth to do. Thanks for your valuable suggestions!
use envpool(built by bazel) in a cmake project.
It's possible. Currently opencv
and sdl2
are built with cmake under bazel, see
google-cloud-cpp might be in the same situation, here is their thinking, just for reference. https://github.com/googleapis/google-cloud-cpp/blob/main/doc/contributor/working-with-bazel-and-cmake.md
Motivation
thanks for this nice library, which is trying to provide is a general solution for various kinds of speeding-up RL environment parallelization. Currently, envpool treats the python users are first class citizens, ignoring and sacrificing the c++ user experience.
Solution
add cmake build method, make it easier for adding envpool as a third-party dependency in c++ environment, where users are not familiar with bazel or in condition which make the use of bazel infeasible.