Skip to content

Create a new rust project from VSCode (cargo new / cargo init) #19338

@joshka

Description

@joshka

Something that I regularly do is create new rust projects (e.g. for testing out some functionality, bug testing, writing a demo etc.) Right now, the process for this is to have a terminal pointing at my root projects folder, run cargo new project-name, then open code pointing at the project (code project-name or Cmd+O, navigate and open).

This should be simpler and provided within VSCode.

For comparison / implementation ideas. The Java plugin for VSCode has a flow that seems reasonable. Select the project type, select the containing folder, select the project name:

Action: Java: Create Java Project also appears in the Explorer No Folder Opened view:

Image

Select Project Type (this would be just as simple as bin/lib for rust projects, but it could be worth considering making this extensible enough to integrate cargo-generate eventually here.)

Image

Select folder (this remembers the last location which was used to create a new project in)

Image

Enter project name:

Image

I searched for a similar issue and didn't find one already - not sure if I've missed it though as this seems like the sort of request which might have come up previously.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions