Skip to content

Override the target directory #436

@SimonSapin

Description

@SimonSapin

Cargo writes build results to a target directory next Cargo.toml. I’d like to have a configuration key in .cargo/config to override this location. Ideally, this configuration would be a template based on the project name or path to the source directory: target_dir = "~/tmp/cargo/{}" would expand to /home/simon/tmp/cargo/rust-url or /home/simon/tmp/cargo/home/simon/projects/rust-url.

(Motivation: ~/tmp is ignored in my backups. Ignoring all directories named target is risky as they’re not necessarily from Cargo build results. For what it’s worth, my ~/tmp/servo-build is currently 2.2 GB (although not using Cargo.))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions