Can I use Cargo to build Rust code without using its standard project layout?
My source files are not in a directory called src
and this will not change. My binaries must end up in the current directory (or, in some other projects, in a different directory that is not called target/SOMETHING
). Can I tell Cargo that executable foo
must be built from foo.rs
and bar.rs
in the same directory as Cargo.toml
, and qux
from foo.rs
?
I don't care about Cargo as a build system or as a deployment system. I'm only interested in it as a library management system. Apparently Cargo is the only game in the Rust town for this.