/rust-cli-example

A small Rust CLI example you can use to build on

Primary LanguageRustMIT LicenseMIT

Coursera Course

Rust CLI Example

A small Rust CLI example you can use to build on. With an emphasis on Linux and creating automation tools that solve a problem for you. This is the basis for DevOps principles that you can apply in day-to-day work.

💡 Are you just looking for a 👉 Rust template to get started easily with a project? The template has everything you need!

This repository is part of the Python and Rust CLI tools course:

Practice Lab

Use the included practice lab to apply the content you've learned in this week. Follow the steps to create your own repository and apply the requirements to complete the lab.

Setting up your environment

Rust development requires certain tools to be installed on your system. The easiest way to do this is to use the rustup tool. This will install the Rust compiler and Cargo, the Rust package manager. Although you can install it in Linux using the package manager, I recommend using rustup. Use the following command or go through the rustup.rs website to install it.

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

This repository and video course focuses on the development side of command-line tools in Rust. It uses Visual Studio Code as the editor of choice. You can use any editor you like, but the instructions in this repository will be for VS Code.

These are all the tools and editor extensions I recommend you install to get started:

As part of your development workflow, I highly suggest you use the following programs in the terminal regularly:

  • cargo fmt - Formats your code to the Rust standard
  • cargo clippy - Lints your code and helps you find errors and potential issues
  • cargo check - Checks your code for errors and allows you to fix them before compiling (which means its faster!)

Resources

Explore additional content that you can use to learn more about the topics covered in this course.

Coursera Courses

O'Reilly Courses and Books