I started RUST


Rust is a multi-paradigm system programming language focused on safety, especially safe concurrency. Rust is syntactically similar to C++, but is designed to provide better memory safety while maintaining high performance.

Wikipedia (https://en.wikipedia.org/wiki/Rust_(programming_language))

RUST is a programing language that has grown in popularity in recent years. Recently, AWS decided to support RUST. Moreover, Microsoft, Facebook to start using RUST.

Install RUST on Mac

As for MacOS, we can install RUST using homebrew. But, I guess, rustup is better than homebrew.

Install RUST with rustup

$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

PATH is automatically added to ~/.zprofile (nice!). Open terminal again or run source ~/.cargo/env.

$ rustc --version
rustc 1.39.0 (4560ea788 2019-11-04)
$ cargo --version
cargo 1.39.0 (1c6ec66d5 2019-09-30)
$ rustdoc --version
rustdoc 1.39.0 (4560ea788 2019-11-04)

Install RUST with Homebrew

If you want, you can install RUST using homebrew.

$ brew install rust

Hello World

Write the following code in “hello.rs” file.

fn main() {
    println!("Hello World!");

And, compile it and run.

$ rustc hello.rs
$ ./hello
Hello World!


Leave a Comment

Your email address will not be published. Required fields are marked *