How to write and run a Rust Program?

devquora
devquora

Posted On: Feb 22, 2018

 

Step to create and run a Rust Program
create a file name main.rs and add following code in it.
fn main() {
    println!("Hello, Rust!");
}

On Linux or macOS to run open terminal run below command

$ rustc main.rs
$ ./main

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Rust Interview Questions

    Explain Rust?

    Rust is blazingly fast systems programming language that prevents segfaults and guarantees thread safety...

    Rust Interview Questions

    Rust was Designed by whom

    Originally Rust was designed by Graydon Hoare, Now it managed by Rust project developers...

    Rust Interview Questions

    When the first version of Rust was released

    The first version of Rust was released in the year 2010...