Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

onelson_90977 avatar image
onelson_90977 asked ·

Would there be interest in the CPP driver I have ported to Rust?

I just started work on FFI bindings for the C/C++ driver in rust. So far, I've generated some symbols using bindgen then used those symbols to port the C driver graph example (we use graph primarily at work, so that's where I decided to start).


Here's the rust port of the example, as of last night:

https://github.com/onelson/dse-driver-rs/blob/5cb343a8d237588505acd4c4ac214a572d84f17d/dse-driver-sys/examples/graph.rs

and here's the output, which I think is pretty close to the what the original would output

https://gist.github.com/onelson/e3eae4f43ba52c5573544b6ee35db3d4


It feels a little too early to make any sort of announcement, but I wanted to put something out there to see if there was any interest.


Next steps for me are to introduce some more rust features to this unsafe API example program, such as iterating over ranges instead of using while loops and manual iteration tracking, then I'll begin to model a higher-level API on top of this to capture the allocation/free of objects as rust lifetimes.


No idea when I'd have something usable for a production setting, but I just wanted to share that I'd been making some small progress.

drivercpprust
3 comments
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I've seen a few efforts on Rust drivers over the past couple years. I know there is interest. I'll push this out on social media and see if anyone is willing to join in the cause!

1 Like 1 · ·

Yep, however, it does not appear to support any of the graph features of the dse driver. If I remember correctly there was a split between OSS Cassandra and "enterprise" dse drivers somewhere along the way, so I assumed this was targeting the former. I'm looking for the latter.

0 Likes 0 · ·

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

Thanks for sharing it @onelson_90977 . Based on the response from @pmcfadin's posts on social media, it looks like there's a lot of interest in it.

For those coming across this post, the driver is available here -- https://github.com/onelson/dse-driver-rs. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.