Skip to content

cargo package --manifest-path foo/Cargo.toml uses foo/target instead of ./target #875

Closed
@SimonSapin

Description

@SimonSapin

When a project contains multiple crates, they have to be packaged and published separately (#849). So I’m using --manifest-path to tell Cargo which crate to publish, starting with leaves on the dependency tree.

This crates and uses a target directory next to the respective Cargo.toml, while I expected it to use the shared target at the project’s root, like e.g. cargo build does when building path dependencies. Is this a bug, or deliberate?

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