Make Bazel Work in MacOS for Iceoryx2
In iceoryx2, it uses bazel
to build C/C++ bindings. Hence, they want to use bazel for rust for a better unification in iceoryx2.
Currently foreign_cc is used to build the C binding and cc_library to build the C++ bindings. In order to fully exhaust the capabilities of bazel, the C binding and therefore the Rust code should be build with rules_rust.
When I tried it, I found it doesn't work in my MacOS. This blog records some knowledge when I learned bazel and how I solved the problem. It doesn't talk about why we use bazel in a rust project.