Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate proposed alternatives to the existing message generation pipeline. #402

Open
maspe36 opened this issue May 13, 2024 · 0 comments

Comments

@maspe36
Copy link
Collaborator

maspe36 commented May 13, 2024

In this months WG meeting, I discussed some painpoints with our current message generation pipeline, and some potential alternatives or changes.

The Problem

Rust does not have a stable ABI, and wants to compile all of the source code and dependencies source code, when compiling a crate. This is fundamentally what pushes us to have such a complex message generation pipeline.

Potential Solutions

I have some ideas that may help alleviate some of this complexity. These ideas are not listed in any order of preference.

Automatically upload ROS 2 messages to crates.io as semver'd packages.

Cargo bakes in semver for crates, but thankfully all ROS 2 message packages have semver versions. Perhaps we could automatically generate and upload crates when new versions of ROS 2 message packages have been published. If we are able to have letters before numbers, then we could in theory have versions like version = "jazzy.*", in our Cargo.toml files. This would alleviate some complexity when it came to upstream message packages, but doesn't change the user story for custom message packages.

Leverage a crate for "plugins"

The abi_stable seems to provide some Rust-to-Rust FFI plugin system. If memory serves this is similar to what we do for rclcpp messages where building the message package, generates a shared library, that downstream packages then dynamically link to.

Restricting a ros2 workspace to have a single cargo workspace

The additional constraints that a cargo workspace provides would potentially allow us to do things like generating message source code on demand from a build script. Of course, this reduces the flexibility of how an end user could organize their source code.

Collecting all upstream ROS 2 messages in a single crate gated with cargo features

This is not my idea, this is from @esteve. Tracking issue for this idea at #394.


None of these ideas are perfect, and we have still only done a very high level investigation into all of them. While this investigation is on going, we are in parallel working to improve documentation for our existing message generation pipeline #401.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant