erickt / rust-zmq

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

Fix CurveMQ for libsodium feature #400

Open esemeniuc opened 1 month ago

esemeniuc commented 1 month ago

I tried https://github.com/bartols/rust-zmq, https://github.com/SylvainMartel/rust-zmq, and https://github.com/conanoc/rust-zmq/tree/libsodium, they didn't work for me. Only 0.9.2 worked.

Simple test:

        let publisher_keypair = zmq::CurveKeyPair::new().unwrap();
        let subscriber_keypair = zmq::CurveKeyPair::new().unwrap();

        println!("Publisher Public Key: {:?}", publisher_keypair.public_key);
        println!("Publisher Secret Key: {:?}", publisher_keypair.secret_key);
        println!("Subscriber Public Key: {:?}", subscriber_keypair.public_key);
        println!("Subscriber Secret Key: {:?}", subscriber_keypair.secret_key);

Fixes: https://github.com/erickt/rust-zmq/issues/357

References: https://github.com/jean-airoldie/zeromq-src-rs/issues/32