to install rust :
install rust
stable installed - rustc 1.32.0 (9fda7c223 2019-01-16)
Rust is installed now. Great!
To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done automatically.
To configure your current shell run source $HOME/.cargo/env
====
sample compilation : rustc test2.rs
see rust language
rust-lang book