April 2026
Intermediate
631 pages
16h 20m
English
Let’s make a new folder named Rust Examples for storing all our Rust code files. We’ll add the example1.rs file to it containing the same code shown earlier in Listing 1.1. Let’s open this file in VS Code by accessing File • Open File. You should be aware that the editor will not auto-save your program; be sure you save manually after making changes.
To compile a program, we’ll write commands in the terminal. The terminal may be made visible via the View menu by selecting Terminal. Enter following command to compile the Rust code file:
c:\ Rust Examples> rustc example.rs
Program execution will take a few seconds, and if no errors arise, the program will return the control to the terminal without ...
Read now
Unlock full access