erickt / rust-zmq

Rust zeromq bindings.
Apache License 2.0
886 stars 189 forks source link

Create context from raw pointer #316

Open rosebeats opened 3 years ago

rosebeats commented 3 years ago

I am working on an application that will be using zmq to communicate between a thread running C and one running Rust. Because of this, I need to be able to create a rust zmq context from the raw pointer passed from the C program so that they can communicate over inproc. In general, I think this would be a useful addition to be able to do this to allow for interoperability between different languages. I'm working on a pull request for implementing this conversion to and from raw pointer to context, though I'm a bit new to rust, so there may be a better way to go about it than what I implement.