HOW TO START WITH RUST PROGRAMMING LANGUAGE?

Table of Contents

INTRODUCTION

RUST is a relatively new programming language which offers a great deal of features which are required for any fast, efficient program.

RUST is easy to learn for the users who already know how to program, but even then we’ll consider that you know nothing about the programming. We’ll go through the different explained steps.

Most of the programming languages have the syntax differences and the difference in the background processes on which the programming language is based upon.

In this tutorial we are concerned about learning the usage of RUST PROGRAMMING language.

In this article , we’d start learning RUST from the scratch.

Before jumping over to HELLO WORLD program, we’ll learn the basic installations which are required so that we can concentrate on learning rather than trying to fix the RUST INSTALLATION.



HOW TO INSTALL RUST FOR WINDOWS 10 or WINDOWS 11

We can easily install the rust package on Windows 11 or Windows 10. Windows 11 has not launched any stable version as of now, so we’ll check the process in Windows 10 only.

Follow the steps to install the RUST PACKAGE in your computer running on WINDOWS 10

  • Go to the link https://www.rust-lang.org/tools/install.
  • The following screen will appear.
  • The buttons for downloading the 32 BIT or 64 BIT versions are shown in the pic below.
  • Choose the appropriate version for your system.

TOOL DOWNLOADING SCREEN FOR RUST

  • When you click the RUSTUP-INIT.EXE 32 BIT OR 64 BIT, the download will start.
  • Save the .EXE file at the appropriate location.
  • Open the location and double click the .EXE SETUP FILE .
  • A WINDOWS DEFENDER ALERT can appear.
ALTHOUGH ALL THE LINKS SHARED HERE ARE RELIABLE AND THE WEBSITE www.rust-lang.org IS OFFICIAL. SO NO ISSUES AND WE CAN GO AHEAD. BUT IF YOU FEEL INSECURE, YOU CAN CLICK DON'T RUN AND THE PROCESS WILL STOP.
  • Click MORE INFO.
CLICK MORE INFO
  • As, we click MORE INFO, additional RUN ANYWAY option will appear.
  • Click RUN ANYWAY if you are sure to go ahead.
CLICK RUN ANYWAY
  • A command line prompt will open offering different installation options.
  • If you want to proceed with the default installation, type 1 and click ENTER.
TYPE 1 AND CLICK ENTER
  • As we type 1 and press ENTER, the installation will take place and the command line tool will close automatically.
  • It’ll set all the path , environment variables etc. itself.
  • The command line tools will be created in your PROGRAM LIST which you can access by going to START MENU.



PREREQUISITES TO INSTALL RUST

If you are trying to run the RUST COMPILER, you will be able to run but won’t be able to compile any code, because we need MICROSOFT C++ BUILD TOOLS essentially for running RUST.

FOLLOW THE STEPS TO INSTALL ESSENTIAL PREREQUISITE MICROSOFT C++ BUILD TOOLS

CLICK DOWNLOAD BUILD TOOLS
  • As, we click the link, the following download option will appear.
  • Click SAVE FILE and the set up file will be saved in the chosen location.
CLICK SAVE FILE
  • Run the saved set up file.
  • It’ll open the VISUAL STUDIO INSTALLER.
IT’LL OPEN THE VISUAL STUDIO INSTALLATION MANAGER
  • The following screen will appear.
  • We only need to choose DESKTOP DEVELOPMENT WITH C++.
THE DATA NEEDED WILL  BE IN THE TUNE OF 5 GB. YOU CAN LET IT INSTALL ALL THE DEFAULT COMPONENTS. 
IF YOU TRY TO SELECT A FEW COMPONENTS TO REDUCE THE SIZE, IT MIGHT LEAVE SOME IMPORTANT COMPONENT FROM INSTALLATION AND YOUR COMPILER MIGHT NOT WORK.

IT IS RECOMMENDED THAT  YOU LET THE VISUAL STUDIO INSTALL ALL THE REQUIRED COMPONENTS.
  • Click INSTALL or MODIFY [ MODIFY IF YOU HAVE ALREADY INSTALLED ].
CHOOSE DESKTOP DEVELOPMENT WITH C++ and click MODIFY or INSTALL
  • The download will start and after that installation will take place.
  • We are done with the RUST INSTALLATION.

FAQs

CAN’T FIND LINK.EXE NOT FOUND

SOLUTION:

This issue emerges and will really make you crazy if you are curious to start the programming but you can’t because your compiler is not working.

LINK.EXE NOT FOUND ERROR EMERGES WHEN YOU TRY TO COMPILE THE RUST CODE. 
The error emerges because of the non availability of the C++ tools which are required for the compiler.

Simply install the VISUAL C++ TOOLS fully and all the required components and the problem will be solved. Avoid picking up any options to save the time.



CHECK IF PATH FOR THE RUST COMPILER IS SET CORRECTLY OR NOT

SOLUTION:

  • Simply open command prompt or press WINDOWS+R.
  • Type CMD in the RUN window.
  • Command prompt will open.
  • Type “rustc” [ Don’t include “”].
  • If you see the compiler options, the variables are perfectly set.
RUST COMPILER OPTIONS