DEV Community

loading...
Cover image for Starting Rust By Example

Starting Rust By Example

qmaximillian profile image Quinn Lashinsky Updated on ・3 min read

When I first started to learn how to code I remember being astounded by what I was able to do. Each new concept building on top of the previous, ultimately leading to the ability to build websites and web apps. I picked up Ruby, then Javascript, and while I became more infatuated with Javascript, in the back of my mind I knew I wanted to learn a more low-level language. I had been hearing about Rust for a bit, but wasn't sure. I thought I should probably try to learn Java, C, or C++. There were a couple of reasons that swayed me against this, and here I am making another attempt at learning Rust.

What were these reasons?

  • The Rust Community:

    The Rust community has always felt welcoming and open. I don't feel the same negativity that can pervade communities around other languages.

  • Tooling Around Rust:

    Rust is easy to install, provides useful built-in standardized utilities like testing and crate documentation and setting up Rust on my computer was simple.

  • Safety And Convenience Of Modern Programming Languages, With The Efficiency And Low Level Control That C and C++ Offer:

    Rust has it's own set of programming paradigms that help ensure issues like managing memory are made easier to manage

  • WebAssembly - The Future of the Web:

    WebAssembly looks to be the future of the web, looking to provide us with the ability to use any language to run code in the browser. Rust has already been involved, with tooling being defined for the spec.

  • Interoperability Among Types of Programming, specifically:

    • Backend Engineering
    • Frontend Engineering
    • Systems Engineering

It really feels like Rust covers almost any area of programming I am or may become interested in!

How We'll Learn

The Rust website has a few recommended ways to start with Rust.

The Rust Book

An awesome resource that gives an overview of the language. I tried learning from the book first, but ultimately the ratio of reading to coding made it hard for me to stay engaged. We'll keep this in mind, and reference the book when necessary!

The Rustlings Course

Great for doing Rust based exercises on your machine, but it's less hands on. I found I was either applying or researching knowledge I found in the Rust Book to solve each problem and became stuck regularly. You are thrown into the deep end, and to some degree, must figure out how to solve each problem.

Rust By Example

We are going to use Rust By Example. It combines elements of the Rust Book while incorporating coding exercises. You can do exercises in the browser using the Rust Playground, but I suggest you install Rust on your local machine. You can even find editor support here

Rust has awesome built-in tooling and we can reference the Rust Book when working through problems.

We're going to cover each chapter in order, including the linked resources at the bottom in depth.

Here's to joining me on this journey to learn Rust!

Discussion (0)

pic
Editor guide