Cross-compiling shared libraries


#1

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: https://travis-ci.org/DanielHeath/rust-cuckoofilter/jobs/506617337

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


#2

You need this in your Cargo.toml

[lib]
crate-type = [“cdylib” ]