libindy uses two crates zmq and sodiumoxide.
I want to cross-compile for Android and both zmq and sodiumoxide allow to be build from source.
sodiumoxide uses libsodium-sys (part of sodiumoxide) to build from source
zmq uses zeromq-src-rs
Problem is that now libsodium.a is build twice and linked twice which fails.
How do I tell cargo that it should build sodiumoxide first and then zmq?
zmq-src-rs can be told to use headers and lib built somewhere else.
So, it is not so that zmq has a dependency on sodiumoxide. If that were the case then cargo would just do the right thing. But introducing such a dependency would be wrong, I think.
An issue for libindy is here https://github.com/hyperledger/indy-sdk/pull/1672
Is there a Rust way to do this or are we doing this wrong?