Replies: 2 comments 5 replies
|
Question: Is it strictly necessary to add Rust to the project? The recommendation is to keep third-party dependencies to a minimum unless they are necessary. In that case, we will need to add it in a way that does not complicate the current compilation process for both supported OS (Ubuntu and Windows). If Rust will be necessary as an external dependency, in my opinion, a discussion about the best way to add it to the project is necessary before taking any action. |
|
Q1: Rust toolchain: Q2: C++17: |
Uh oh!
There was an error while loading. Please reload this page.
Context
I'm currently implementing Zenoh as a third ROS 2 middleware option alongside FastDDS and CycloneDDS on the
ue4-devbranch, building on the rename refactor in #9711.Before opening the implementation PR, I'd like to align on two architectural decisions that affect the build system.
Question 1: Rust as a new build dependency
zenoh-cis written in Rust, so building it from source adds a Rust toolchain to CARLA's build-time dependencies. Setup.sh would install the toolchain project-locally so no system-wide Rust setup is required from users.Rust installation itself is quick, and the zenoh-c / zenoh-cpp build time is comparable to the existing FastDDS / CycloneDDS builds.
Is introducing Rust as a build dependency acceptable?
Question 2: -std=c++17 for the
carla_ros2targetIncluding
zenoh.hxx(the zenoh C++ wrapper) requires C++17.Proposed approach: scope
-std=c++17tocarla_ros2andcarla_ros2_debugtargets only by adding it totarget_compile_optionsinLibCarla/cmake/ros2/CMakeLists.txt(L30, L52).Other targets (libcarla-server, libcarla-client, PythonAPI, UE plugin, etc.) stay at C++14.
This is safe because:
-std=is last-wins, so the per-target flag overrides the toolchain's global-std=c++14only for the targeted unitsFallback: if C++17 is not acceptable, I can implement the middleware using
zenoh.h(zenoh-c's pure C API) instead. However, the implementation becomes more verbose — I'd need to manually open/close zenoh handles and free resources for every object, which the C++ wrapper handles automatically.Is the scoped C++17 bump acceptable?
Next steps
Once both decisions are aligned, I'll open the implementation PR.
Thanks in advance for your time and feedback! @LuisPovedaCano @JArmandoAnaya
All reactions