How to install Rust on Fedora Linux

How to install Rust on Fedora Linux

Rust is a more recent programming language focused on performance and memory safely, mainly safe concurrency.

Rust is syntactically like C++.

It provides memory safety without using garbage collection.

Installing Rust on Fedora.

The command below will install rust compiler and its dependencies.

sudo dnf install rust cargo

Once Rust installs successfully, we can write our first program in Rust and compile and execute it.

Creating a file, .rs is the file extension used by Rust.


Write this code in the file

fn main() 
    print!("Hello World!");
    print!("Rust coding day {}", 1); 

Save the file and run the Rust compiler.


This will compile and create an executable file named after as hello.

Execute the hello compiled binary.


Now you have Rust installed and running.

Happy Coding!

Leave a Reply

Your email address will not be published.