Skip to content

cargo package (and publish) includes target folder #15398

Closed
@eirnym

Description

@eirnym

Problem

Per documentation, target folder is excluded from package.

let's test it:

$ cargo init t
$ cd t
$ git init . && git add .* * && git commit -m "initial commit"
$ cargo package
$ find target/package/t-0.1.0/target
  1. It builds the target (default profile on localhost is dev)
  2. It includes files from target

First point is concerning, because I don't trust any build process enough to share secrets with it. Even if on CI you cannot call remote, secrets might be embedded into package.

Second point is clear discrepancy with documentation, which states, that target folder is ALWAYS excluded.

Explicit exclude for target folder doesn't work

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version


Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugS-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions