I'm triyng to run my binary using the cargo run command. My crate is linked to an external C static library, already compiled, (nl_data.a) that is located in the root of the project (same level as Cargo.toml and lock).
@kornel wrote up a really good article on how to create a *-sys crate, a crate which exposes raw bindings to a native library and sorts out all of the building + linking steps.
It's more targeted towards a project that is meant to be published and used by lots of people (e.g. bindings to popular libraries like libgit2 or libssh) so some of the steps and tips will be unnecessary for your use case, but you may find it enlightening.
Ok thank, effectively, yesterday, after more research in the docs I found that I have to use a custom build script. I first missed that info and I was sure that I had to deal with the target keys...
But I found that the way for include external libraries through a custom build script which uses some println to communicate with rustc is, at least, weird (in my opinion).