Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
--target-dir or the CARGO_TARGET_DIR environment variable will let you specify the directory for all generated files, but, for just the output binary itself, the --out-dir option is not API-stabilized yet, so you need a nightly-channel toolchain to use it.
In the mean time, the usual solution is the same as is currently done for any other post-build processing... instead of running cargo build directly, use something like just or cargo-make which can run cargo build as part of a more involved process and then copy the resulting binary to where you want it.