cyclonedds icon indicating copy to clipboard operation
cyclonedds copied to clipboard

Cyclone dds for Rust

Open jalexcole opened this issue 10 months ago • 6 comments

Hi, I was wondering if there could be official support for a rust version of cyclone dds. I have been working on a wrapper, that likely would be easier to maintain. I would like it to eventually go into crates.io . Would this be something that eclipse-cyclonedds would endorse and help maintain after the initial implementation? cyclone-rs

jalexcole avatar Feb 28 '25 18:02 jalexcole

Stuck on this project. With Topic descriptor and Logging.

With topic descriptor I am getting a segfault when trying to implement my own and translate it back to the dds_topic_descriptor_t and trying to create a topic. Is there a guide on how to make a topic descriptor so that I can derive one from the topic?

For logging is there an easy way to pass in a callback function that can give a string that can be passed to tracing.

I also have a GitHub ci file that is missing some cmake config to build in ubuntu x86_64.

jalexcole avatar Mar 12 '25 23:03 jalexcole

Hi, I was wondering if there could be official support for a rust version of cyclone dds. I have been working on a wrapper, that likely would be easier to maintain. I would like it to eventually go into crates.io . Would this be something that eclipse-cyclonedds would endorse and help maintain after the initial implementation? cyclone-rs

Author of cyclonedds-rs here (https://github.com/sjames/cyclonedds-rs). I'm not sure if you find all your questions answered. I have no bandwidth to work on this now, but happy to answer any questions. PRs also welcome!

sjames avatar Mar 13 '25 10:03 sjames

Ignoring Rust seems like a silly choice, especially given that we do support C++. For now it is better to keep it separate, not because it is not welcome, but because I first need to figure out how the project can maintain it. It might need some adjustments somewhere.

For the topic descriptor bit: you're probably better off avoiding the C representation for data and serialize directly to/from Rust. The interface to do that in Cyclone is nasty (sorry ... I want to clean it up, but ... time ...), but I know @sjames did a lot of work that should make your life a lot easier. So I highly recommend following his link!

eboasson avatar Mar 13 '25 10:03 eboasson

@eboasson I looked at @sjames and it looks like a different approach than I wanted. Also was not able to build it but it looks like he does not statically compile in dependencies. It does look like I am going to have to either go into the internal topic or somehow get a prototype working as a dynamic topic.

Also, with the QoS, does the setter need to be used before the getter?

jalexcole avatar Mar 16 '25 21:03 jalexcole

Hey @jalexcole, it's cool that multiple people are building Rust bindings for Cyclone 🌀! I wanted to chime in that I'm also doing some work on a Rust binding that will hopefully be contributed to the Eclipse foundation, it's in general following the same process as the C++ binding, the Python binding, and the binding Sojan built (so making use of the sertype/serdata interfaces). You mentioned

... and it looks like a different approach than I wanted.

Given that the other bindings also operate in a similar fashion I was wondering if you could articulate more on what/why you would prefer a different approach (just for my curiosity 😆).

We can also touch base to share info via this issue on GitHub or if you want more in-band communication via the CycloneDDS community on Discord: https://discord.gg/4QQvWZrFKF.

noxpardalis avatar Mar 21 '25 08:03 noxpardalis

Hi, I was wanting a static library so that there were no outside dependencies unless otherwise specified. I was also trying to write everything on top of the c interface but this might not work as I thought. Another thing is I have been working a whole edition newer and may move to rust 2024.

jalexcole avatar Mar 21 '25 14:03 jalexcole