We could use the cargo config subcommand once it is stable to determine the target dir (documentation, tracking issue).
cargo config