From the course: Rust Essential Training

What is Rust? - Rust Tutorial

From the course: Rust Essential Training

Start my 1-month free trial

What is Rust?

- [Presenter] Before we dive headfirst into writing Rust code, let's take a step back to understand what makes Rust special and why developers would want to use it. Rust is a relatively young language making its first appearance in 2010 as a Mozilla research project. It's an open source systems programming language whose syntax looks similar to C plus plus. Rust builds on decades of experience and lessons learned from programmers using C plus plus and other related languages to create a modern programming language that's designed for performance and reliability or safety especially for concurrent programming. Like C plus plus, Rust is a compiled language meaning it uses a program called a compiler to take the source code you write and turn it into machine code that can run natively on the system. That means Rust programs can be incredibly fast and efficient with performance similar to C plus plus, and in some cases even better. Rust is also a statically and strongly typed language. Statically typed means the data type for every variable must be known at compile time and cannot be dynamically changed later and strongly typed means there are restrictions on converting between data types which are designed to help prevent writing incorrect programs. Those are all things Rust has in common with C plus plus the main way Rust differs is how it manages memory. In C plus plus, invalid memory access is a notoriously common source of bugs. Rust solves that problem by using an ownership model that allows the compiler to check all memory accesses to guarantee that they're valid that makes Rust program's memory safe by default. It's not possible to accidentally corrupt your data in memory. Also, since those checks are performed at compile time, it doesn't impact runtime performance like other types of dynamic memory management such as garbage collection. The one downside to Rust's ownership model is that it's different than what most programmers are used to and therefore requires a different way of thinking which we'll cover in this course. With Rust promising such great performance and reliability, you might be wondering if it's going to replace C plus plus and maybe someday but it's not going to happen overnight. Applications today are built on decades worth of C plus plus code and libraries so Rust has a long way to catch up to replace all that legacy code. That said, major tech companies are actively supporting Rust development as sponsors and they're choosing Rust for some of their newer projects because its guarantee of memory safety is a huge advantage. Rust adoption is increasing and the language has been steadily climbing in popularity. In addition to the guiding principles of performance and reliability, Rust is also focused on enabling productivity by having a robust compiler that provides useful messages and hints, support for common development tools and great documentation. You can find a lot of that documentation like going to the learn page on Rustlearn.org. At the top of this page, you'll find three fantastic resources for learning Rust intended for different styles of learners. If you prefer books, you can read the Rust Programming Language also known simply as The Book which is a go-to resource for getting started with Rust. If you prefer to learn by looking at example code then Rust by example has you covered. As you go through this course if you find yourself struggling with certain concepts, I recommend using these resources as alternative explanations and examples. Further down the page, you'll find the core Rust documentation which will certainly come in handy as you work your way through this course and below that are several other guides on specific application domains as well as more advanced concepts and Rust. If those resources don't answer your questions, you can also ask around on the Rust community forum or the active Rust sub reddit. There's a great community behind Rust and it keeps on growing.

Contents