https://www.snoyman.com/blog/2018/10/rust-crash-course-01-kick-the-tires

I also blog frequently on the Yesod Web Framework blog, as well as the FP Complete blog.

See a typo? Have a suggestion? Edit this page on Github

In this lesson, we just want to get set up with the basics: tooling, ability to compile, basic syntax, etc. Let’s start off with the tooling, you can keep reading while things download.

This post is part of a series based on teaching Rust at FP Complete. If you’re reading this post outside of the blog, you can find links to all posts in the series at the top of the introduction post. You can also subscribe to the RSS feed.

Tooling

Your gateway drug to Rust will be the rustup tool, which will install and manage your Rust toolchains. I put that in the plural, because it can manage both multiple versions of the Rust compiler, as well as cross compilers for alternative targets. For now, we’ll be doing simple stuff.

Both of these pages will tell you to do the same thing:

Read the instructions on the rust-lang page about setting up your PATH environment variable. For Unix-like systems, you’ll need ~/.cargo/bin in your PATH.

Along with the rustup executable, you’ll also get:

Hello, world!

Alright, this part’s easy: cargo new hello && cd hello && cargo run.

We’re not learning all about Cargo right now, but to give you the basics: