Rust can create dll/so/dylib?


#1

Hello and greetings,

I maintain a desktop API where the deploy is basically a binary library (one for each OS: Windows, Linux and Mac).

At this time, does Rust is able to create such libraries during compile time ?

Cheers


#2

Yes. Details can be found here: http://doc.crates.io/manifest.html#building-dynamic-or-static-libraries

The details of these crate types can be found here: https://doc.rust-lang.org/reference.html#linkage


#3

In particular if you want to create a standard dynamic library to be consumed by other applications written in other languages, you most definitely want a crate type of cdylib. You typically do not want dylib.


#4

Thanks a lot.