Create new rust project in vs code w/o terminal

how can i create a new rust project in vs code w/o terminal and by linking cargo new to the new file menu item or creating a project menu item in vs code?

can u be brief about it

I don't know about the file/project menus, but there is an extension which add a custom sidebar for common cargo commands, and you might find it interesting:

tyvm nerdidation. that will help.

hashi,
on ides i used, they had the menu with items like file, edit, view, build, project, tools, dedug, etc.
i would choose file, new, project or file. then ide had create the project or file according to programming language configuration that i chose.

Vscode isn't really that tightly integrated with any specific language or ecosystem (except maybe javascript and typescript, to some extent). It's comparatively hands off and would typically need plugins to provide specific tools. Some of the most common ones are pre-installed, though.

On top of that, Rust doesn't require a lot of project setup and configuration to get going or run its CLI tools. I think they are worth learning. You will get far with them, rust-analyzer and eventually debugger Integration for when you need to go deeper.

I think I have seen project templates too, other than what cargo new uses.

And of course, I can't argue against personal preference. :slightly_smiling_face:

tyvm for your very informative response. the CLI tools are cool to use. i am humbly new to rust. my company unfortunately is security overkilled and makes us use non-CLI programming tools/ides like the full blown visual studio 2022 enterprise and intersystems post-rational database iris studio. even i had to use the rust digital signed msi to install rust on a company pc.on my personal pc, i used rustup to install rust. CLI is mainly used by the company's client/server/database staff for scripting pc or server image changes for deployments.

1 Like