[Solved] Maximum uncoupling: Rust apps using a Rust library


#1

Solved: cargo takes care of it.

========

I have a Rust library that is the basis for various Rust apps. A Rust app provides app specific callbacks implementing the traits defined by the library. In C the app would typically only read the header files and link with the binary library. How does this work with Rust? So far I can only see that each app must be compiled with the library source… I would very much appreciate some pointers to the relevant documentation. Thanks.


#2

Note that Rust performs static linking by default, whereas C programs often link dynamically, and cargo builds a separate version of the dependency under the target directory of each crate.