-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Cargo new --example #6939
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
Comments
So if I were to run I wonder if you might be referring to scaffolding, and are hoping to get some Yeoman-esque functionality in the cargo tool? |
Probably only that it lands in "examples" folder. I'm not looking for much.
Just a little help for the people who's new, and don't know how the
examples should look. For instance, I'm making a library, and had to go
look up how a main method in rust looks, cause I didn't remember. Then, I
didn't know if I could do examples/<name>/main.rs, or if I had to do
examples/<name>.rs. Also, considering there's `run --example`, I would say
it fits together, and I sort of expected it to work.
…On Wed, May 15, 2019, 06:00 Jesse Lawson ***@***.***> wrote:
So if I were to run cargo new --example celeryman, what would be
different code-wise from running cargo new celeryman?
I wonder if you might be referring to scaffolding, and are hoping to get
some Yeoman-esque functionality in the cargo tool?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6939?email_source=notifications&email_token=AAA3NTWMLCW6SBZQTFARDDTPVODE3A5CNFSM4HMZMRNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVNN36Y#issuecomment-492494331>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAA3NTUISZPKRPN22U4NFMDPVODE3ANCNFSM4HMZMRNA>
.
|
It would be nice to have this feature. The command should generate:
|
It would help if the docs for I can just copy stuff from an [cough] example crate and fiddle until it works, but it would help to have a pointer to an explanation in the docs. |
Yeah, there's also that. The only reason I know about the feature is because I noticed a large-ish project using it and I reverse engineered it. The docs weren't of much help. |
Bumping this one for interest |
Describe the problem you are trying to solve
Make it easier to add examples to a project.
Describe the solution you'd like
I would like a basic scaffold of an example, probably with just an empty main method when I run
cargo new --example <name>
.The text was updated successfully, but these errors were encountered: