Hello world with rust

How to install and build with cargo

Install & hello!

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Note: This will not work with centos/rhel6, since the curl version is too old and ssl1.2 is not patched.
  2. Download it as a script and execute it if you're dealing with such kind of platform.
  3. you will need cc(gcc) installed, and of course internet connection.
  4. install with default setting, this will add rustc, cargo, rustup into your shell env.
  5. cargo new hello, cd hello, cargo run hello then you will get the most important message: hello world.

some useful commands:

rustup update: update rust

To be continued...

Tags