Skip to content
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

In the default Cargo.toml template provide help for completing the metadata #6845

Closed
kornelski opened this issue Apr 13, 2019 · 4 comments · Fixed by #6881
Closed

In the default Cargo.toml template provide help for completing the metadata #6845

kornelski opened this issue Apr 13, 2019 · 4 comments · Fixed by #6881
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new

Comments

@kornelski
Copy link
Contributor

Currently cargo new generates Cargo.toml with absolutely minimal set of fields.

It's left up to users to discover and learn about other Cargo.toml fields. I think it could be improved, for example:

  • Insert comments with hints or links, e.g.
    # See more https://doc.rust-lang.org/cargo/reference/manifest.html

  • Insert some fields with default or empty values, e.g. categories = [] # https://crates.io/category_slugs. That would show users that this field exists, and prompt them to complete it. The category field in particular is often missing, and that reduces usefulness of browsing https://crates.io/categories

@kornelski kornelski added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Apr 13, 2019
@k-nasa
Copy link
Contributor

k-nasa commented Apr 23, 2019

I think this is wonderful 😄

@k-nasa
Copy link
Contributor

k-nasa commented Apr 25, 2019

May I work on this?

@kornelski
Copy link
Contributor Author

I don't mind :)

@k-nasa
Copy link
Contributor

k-nasa commented Apr 26, 2019

Thank you!

bors added a commit that referenced this issue May 2, 2019
Default Cargo.toml template provide help for completing the metadata

## Descriptio
This is new Cargo.toml example.
```toml
[package]
name = "foo"
version = "0.1.0"
authors = ["k-nasa"]
documentation = ""
homepage = ""
repository = ""
readme = ""
categories = []
keywords = []
license = ""
edition = "2018"

[dependencies]

# See more https://doc.rust-lang.org/cargo/reference/manifest.html

```
## Motivation
close: #6845
@bors bors closed this as completed in #6881 May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants