How to run Rust in VS Code ?

<p>The&nbsp;<code>cargo init</code>&nbsp;command creates a new Cargo project in the current directory. It does this by creating a&nbsp;<code>Cargo.toml</code>&nbsp;file, which is the manifest file for Cargo projects. The&nbsp;<code>Cargo.toml</code>&nbsp;file contains information about the project, such as its name, dependencies, and build instructions.</p> <p>The&nbsp;<code>cargo init</code>&nbsp;command also creates a&nbsp;<code>src/</code>&nbsp;directory, where the project&#39;s source code will be stored. By default, the&nbsp;<code>cargo init</code>&nbsp;command creates a&nbsp;<code>main.rs</code>&nbsp;file in the&nbsp;<code>src/</code>&nbsp;directory. This is the entry point for the Rust program.<br /> You can write rust code in the `main.rs`.</p> <p>To run your code, you can click the run icon(on the top right), but it will not work when you have to take input, because it will run the code in the output section.</p> <p><a href="https://medium.com/@rohanbhatotiya/how-to-run-rust-in-vs-code-3cc4e55dedb2"><strong>Learn More</strong></a></p>
Tags: Run Rust