IntelliJ Rust Learning Courses News Project-Based Learning

Learn Rust With JetBrains IDEs

Read this post in other languages:

There is no royal road to learning a programming language; everyone does it differently. Some read a lot (books, blogs, tutorials, docs, Reddit discussions, StackOverflow answers, and more); some ask questions and look at examples; some write their own code and work on pet projects; some solve problems; some explore ecosystems – whatever works best for them. Some even do all of that. People usually start by learning language features and ways to combine them in programs. At some point they learn different approaches to problem-solving. Sooner or later they move from using standard library components to external libraries and exploring how to test, debug, write logs, profile their apps, and so on.

Rust is no exception: No single educational resource is enough to help you master it. Still, at JetBrains we have something to suggest – our free Learn Rust course, which covers many of the learner needs we’ve just mentioned.

The course borrows text from The Rust Programming Language, a book by Steve Klabnik and Carol Nichols with contributions from the Rust community. While it features most of the exercises from the well-known rustlings set, about a quarter of the exercises we designed specifically for the course. Rather than merely compile pre-existing materials, we carefully combined the texts and exercises and put them in an IDE format to create a new way to learn Rust.

Why Rust

Rust has been listed as the most-loved programming language in the StackOverflow developer survey for 7 years in a row, as well as the most-wanted (tied with Python).

Recently, Rust has made its way to the list of supported languages for writing Linux kernel components (and it’s the second-placed language in that list, right after C!). Libcurl, one of the most used libraries for fetching data over networks, is gradually moving toward Rust. Google reports that the share of Rust code in their Android implementation is increasing from release to release, and this helps them to reduce the risk of vulnerabilities and improve security. Microsoft heavily relies on Rust to provide memory safety in their products, while Amazon uses Rust to ensure the sustainability of their infrastructure.

Developers using other programming languages, such as JavaScript or Python, often turn to Rust when they need to achieve better performance for tooling and libraries.

Last but not least, Rust has a very welcoming community, always willing to help and encourage beginners.

With all that being said, potential learners should be aware that Rust has a difficult learning curve and requires a systematic approach to learning. The latter is exactly what we aim to provide with our Learn Rust course.

Learning Rust in an IDE

Our Learn Rust course is built on the educational platform provided by the JetBrains Academy plugin. This plugin is available in many JetBrains IDEs, including CLion, GoLand, and IntelliJ IDEA Community Edition, among others, and allows you to learn not only Rust but several other programming languages for free.

IDE-based courses involve reading educational materials, exploring code examples, and solving problems, structured into lessons and course sections. Each lesson includes a sequence of bite-sized steps, each being either a theory step with an example to play with, or a problem step with a problem to solve. Problem steps provide an easy way to check your solutions.

When working with any IDE-based course, you have a fully functional IDE window with 3 panels: a course view, a code editor, and a description, as in the screenshot below.

The added bonus of taking a course in an IDE is that, while learning a language, you gain software development experience at the same time. While performing the learning exercises, you also write, check, fix, run, debug, and test code, just as a real coder would as part of their daily software development routine. By the end of the course, you’re not only left with a solid knowledge of the programming language, but you’ve also familiarized yourself with a professional development tool and are well on your way to becoming a software developer.

Check out the IntelliJ IDEA for Education page to learn more about the benefits of learning programming in an IDE.

Course specifics

The Learn Rust course, just as the book it’s based on, assumes that you have a working knowledge of some programming language. Rather than offering an introduction to programming, it teaches you to program in Rust specifically, and as such skips most of the basic topics commonly found in programming courses.

Following the structure of The Rust Programming Language, the course contains the following sections:

  • Introduction
  • Common Programming Concepts
  • Understanding Ownership
  • Structs, Methods, Enums, and Pattern Matching
  • Modules
  • Common Collections
  • Error Handling
  • Generic Types, Traits, and Lifetime
  • Writing Automated Tests
  • Standard Library Types
  • Fearless Concurrency
  • Macros

Learn Rust contains 331 steps in total, including 210 theory steps and 121 problem steps. Each course step comes in the form of a Cargo package, making it possible to showcase and learn not only basic features of the Rust language, but also modules, crates, macros, package-level tests, external dependencies, etc.

Working on each step involves both reading and working with code. If the code in the step has the main function, it can be run:

For most problem steps, you are exposed to a single code file (like in the screenshot above), but sometimes you have access to the whole package structure so you can explore all the significant components, such as the project description files:

From this point, you can reach a crate’s documentation or learn about the available releases.

Naturally, while discussing testing Rust packages, we expose the test files:

You can run individual tests or all of them at once before attempting to check your solution by clicking on the Check button.

These course features are aimed at introducing you to the best practices of software development in IDEs as early as possible. We believe that using professional tools right from the beginning of your learning journey can be a huge benefit. With first-class Rust support in JetBrains IDEs, now you can do this as you learn Rust, too.

Learn Rust and tell us what you think!

Clearly, building a solid knowledge of Rust requires more than just following this course, but we think it can serve as a perfect start into the exciting world of Rust programming for many future developers. We hope you’ll enjoy studying Rust with us! Feel free to share your feedback in the comments section below or by contacting us at academy@jetbrains.com.

image description