Normally, the root crate is local and cargo build
downloads and builds the dependencies. cargo install
downloads a root bin crate, builds it and puts the result under .cargo/bin
.
Can Cargo be told to download from crates.io and build as staticlib a lib crate and to put it into a designated place relative to the invocation directory?
Use case: Invoking the download and build of a Rust library from within a C or C++ project's makefile when the C or C++ project uses the Rust library via FFI.