Getting Started with Rust

Install and Run Your First Project

Santhosh Kumar
Rust Series

--

Getting Started with Rust

Mac OS

Cargo is installed along with Rust using Homebrew.

Cargo — It is the rust package manager and build system

brew install rust

Rustup

  1. You can use rustup to manage the version of Rust.
  2. It is similar to nvm (Node Version Manager) in Node.js.
  3. Installing rustup enables you to easily switch between stable, beta, and nightly compilers and keep them updated.
brew install rustup

Create your first project using Rust

cargo new rust-project
cd rust-project

Open the file path in your IDE

  1. You will see a Cargo.toml file which is similar to the package.json file in Node.js.
  2. There will be main.rs file in the src directory which is similar to index.js file in Node.js.

Cargo.toml -> package.json

main.rs -> index.js

Useful Extensions for Visual Studio Code Setup

You can install the below Extensions,

  1. rust-analyser — It is…

--

--

Santhosh Kumar
Rust Series

I am a developer and consultant focused on security. I love creating secure applications and sharing insights on best practices and efficient algorithms.