From now on we are going to be mainly using this doc as a reference: Link. This is a very useful document that teaches us how to use Rust by examples. There are certain elements to Rust that is different than traditional languages. We are going to talk about some of the more notable parts of them. Macros One of the important concepts in Rust are macros. As we saw in the previous post, anything ending with a ! is a macro. There are certain macros built in such as println!, but we can also create our own macros. For example: // This is a simple macro named `say_hello`. macro_rules! say_hello { // `()` indicates that the macro takes no argument. () => {
11/14/2022In this section we are going to talk about the history of Rust and we're it is used today. History of Rust Rust was created by Graydon Hoare in 2006. It was originally called Rusty and was a hobby project. In 2009 Mozilla started to fund the project and in 2010 the first version of Rust was released. In 2015 Rust 1.0 was released and it has been used in production since then. It has gained popularity in the last few years mainly do to its speed and safety. Its most common uses right now are in the development of operating systems, browsers, and other low level software. What once started as a small project inside of Mozilla has now become a very popular language poised to replace C and C++ in the future. Rust Today Today Rust is used in many projects most notably, Firefox and Dropbox use Rust. Firefox uses Rust to build Stylo, a parallel CSS engine. Dropbox uses Rust to build a new version of their sync engine. Rust is also used in many other projects such as Servo, a browser engine, and Redox, a Unix-like operating system. Since 2015, Rust has been rated as the most loved programming language in the Stack Overflow Developer Survey with a whopping 86.1%. It is also the fastest growing language in the survey source. Currently Rust developers are one of the highest paid developers in the world. The average salary for a Rust developer is $120,000. This is a huge jump from the average salary of $100,000 for a C++ developer. This is due to the fact that Rust is a newer language and is still growing in popularity. As Rust continues to grow in popularity, the average salary for Rust developers will continue to rise. Rust has even become the main language of Android as Google has begun its transition from C to Rust starting in 2021. This is a huge step for Rust as it will be used in many Android devices. Given all of these facts, it is clear that Rust is a language that is here to stay and will only continue to grow in popularity in the future.
11/14/2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up