Skip to content

Add rosidl_rust to a sourced overlay in the docker image #494

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

Merged

Conversation

maspe36
Copy link
Collaborator

@maspe36 maspe36 commented Jun 29, 2025

Add rosidl_rust in an overlay sourced in the dev container via an entrypoint.

Move any logic that will change between distros into shell scripts for more flexibility.


Rather than for ros2_rust development, I find this image most useful for downstream development of packages. This way I can just add rclrs as a dep and everything "just works". There is probably a discussion to be had for moving this out of the repo as its more rclrs adjacent at this point.

Tested locally for Humble, Jazzy, Kilted, and Rolling with our ros2_rust workspace (described in the README) with a COLCON_IGNORE in the src/ros2-rust/rosidl_rust/rosidl_generator_rs package.

cd rust_ws/
docker build --build-arg ROS_DISTRO=jazzy -f src/ros2_rust/Dockerfile -t ros2_rust_dev:jazzy . 
docker run -it -v ./:/workspace ros2_rust_dev:jazzy

In the container

rm -rf build/ log/ install/
colcon build

Copy link
Collaborator

@esteve esteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maspe36 LGTM, thanks!

@esteve esteve merged commit 5ea1c95 into ros2-rust:main Aug 15, 2025
12 of 17 checks passed
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

Successfully merging this pull request may close these issues.

2 participants