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

Support for building Debian packages #310

Open
ashquarky opened this issue May 3, 2023 · 1 comment
Open

Support for building Debian packages #310

ashquarky opened this issue May 3, 2023 · 1 comment

Comments

@ashquarky
Copy link

It would be useful if it was possible to make Debian packages from a project using ros2_rust. There's official documentation for doing this, but bloom-generate claims to not support ament_cargo builds, along with rclrs and rosidl_runtime_rs not being in rosdep.

My project at least doesn't seem to have ended up with any dynamic dependencies outside the standard ROS libs, so if that's the common case it might not be that complicated to support (dependencies can mostly be ignored?)

There are other potential distribution methods too:

  • Copying source and building on-target - rough for robots with weak CPUs
  • Just copying binaries around - as mentioned, seemingly only standard runtime deps, so this is ugly but functional
  • Docker - works fine, though I had some weird issues with --net host and FastDDS (unrelated to ros2_rust)

Of these, I think debian packages are the best option. What work has to be done for bloom to support cargo; if that's even possible before being in the core distribution?

@esteve
Copy link
Collaborator

esteve commented May 3, 2023

@ashquarky thanks for your interest in ros2-rust. Adding support for building Debian packages out of ros2-rust is not currently possible, we'd need at least these two before we can do that:

  • Add support for Cargo to rosdep. No easy feat, we talked with the maintainers of the ROS buildfarm and they raised several concerns about it,
  • Include the Rust toolchain in the ROS Buildfarm. The ROS buildfarm builds packages without access to the internet, as a security measure, we'd need to find a way to "freeze" dependencies so that Cargo does not download them

As a first step, we want to submit rosidl_runtime_rs to the ROS buildfarm, as it's just a regular ROS package written in Python, and eventually enable it as one of the default message generators. Before that we want to add support for actions (see #295), which would bring it to pretty much feature parity with other message generators. Once we have that included in the standard ROS distribution, all messages will be generated as Rust structs and although rclrs will still be distributed as a crate, the barrier to entry for having ROS 2 applications written in Rust will be much lower.

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

2 participants