Skip to content

Remove Cargo.toml from package.include in example #15253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/doc/src/reference/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,13 @@ exclude = [
```

If you’d rather explicitly list the files to include, Cargo also supports an
`include` key, which if set, overrides the `exclude` key:
[`include` key](manifest.md#the-exclude-and-include-fields), which if set, overrides the `exclude` key:

```toml
[package]
# ...
include = [
"**/*.rs",
"Cargo.toml",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe also this to point out not only Rust files can be included.

Suggested change
"Cargo.toml",
"resources/to/include/*",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid confusion would it be better to also add a link to the relevant docs since there is a difference between resources/to/include/*, resources/to/include/, and resources/to/include? Or maybe just mention that it should be gitignore-like patterns?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Yeah we can link to the same paragraph like this for the include key as well:

can use the [`exclude` key](manifest.md#the-exclude-and-include-fields) in the

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

]
```

Expand Down