Taswar Bhatti
Practical guides on AI agents, LLM security, C#/.NET and Cloud, from Taswar Bhatti
Tag: rust
LearningRustVSCode

I wanted to talk about basic types in Rust. Lets begin with Numerical Types in Rust, since Rust is a statically typed language, which means that it must know the types of all variables at compile time. I will talk about number types that are built into the language.

Numerical Types

Numerical values are divided into Integer Types and Floating-point type. A simple numerical type can be signed integer types or unsigned integer types.

Integer Data types are listed below:

… Read the rest “Numerical Types in Rust with VSCode”
LearningRustVSCode

Continuting on from where we left off, in this post I will refactor my code to use a function such that I can reuse my code later on. I will showcase how to write Functions in Rust with VSCode.

Intro

If we look at our previous post we have a very simple main function and it is just getting user input and then it outputs it with the println method. Its not one of the most elegant code but we we taking baby steps here. As a preview of our code code, it looks like below.

… Read the rest “Functions in Rust with VSCode”
LearningRustVSCode

In this post we are going to take our baby steps in learning Rust and the simple example of a hello world would not just cut it. We will now introduce how to Capturing User Input in Rust.

Intro

To get started we will use our trusty cargo package manager again to create a new project for us. If you have not used cargo yet, please look back at my previous post on how to setup cargo.

This will create a file system looking like below.

… Read the rest “Capturing User Input in Rust with VSCode”
LearningRustVSCode

In this post I will go over how to write Unit test for your Rust application. We will continue with where we left off with the hello world program and see what Rust has to offer us in unit testing. Note: I will be Writing and Running Intergration Tests with Rust in VSCode.

Creating Rust test directory

Our directory would look something like below.

… Read the rest “Writing and Running Intergration Tests with Rust in VSCode”
LearningRustVSCode

I recently started to look into Rust and found it quite interesting and fun to work with, reminded me of working a bit like go and C lang. Thus I though it would be good to go through a blog series on of learning Rust with VSCode.

I will be using WSL Ubuntu 20.04.3 LTS for my development. If you are not using WSL yet, it allows you to have a linux terminal right inside of your windows desktop. Windows Subsystem for Linux 2) allows users to run a Linux VM inside windows and gives a near native Linux experience.

Installing Rust

Lets install Rust in your Ubuntu environment.

… Read the rest “Learning Rust with VSCode”
UA-4524639-2