This guide can be incredibly valuable when you're short on time and need a quick way to back up your scripts.
This guide will walk you through the process of compiling and running a Rust file on your system.
Before you begin, make sure you have Rust installed on your machine. If you haven't already, you can download and install Rust by following the instructions on the official website: Rust Installation Guide.
-
Open your terminal or command prompt.
-
Navigate to the directory containing your Rust source file (
.rs
file). -
To compile your Rust program, use the
rustc
(Rust compiler) command followed by the name of your source file. For example, if your source file is namedmain.rs
, run the following command:rustc main.rs ./main.exe <folderPath>
-
Or You can just use the executable ;)