Cross-compiling shared libraries


I’m trying to cross-compile a shared library to multiple targets for release.

However, whenever I specify a target with cargo build --target, no shared library files are generated in target/release. If I don’t specify the target, I get a shared library for my current environment.

The travis job where it fails is here:

Any suggestions? Is there something obvious I’m missing?


You need this in your Cargo.toml

crate-type = [“cdylib” ]