parsa-cu

@parsa-cu

Joined on Nov 10, 2022

  • 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. () => {
     Like  Bookmark
  • In 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.
     Like  Bookmark
  • Rust has quickly become one of the most used programming languages in today's world. There has always been talks about what language would be the successor of C. Currently whether it is the linux, windows, or mac kernel, C has been the language of choice. However, ever more recently there has been continuous talks of switching the Linux kernel from C to Rust. Rust has had a steady rise in popularity over the last few years, and in April of 2021 Google announced that they will be transitioning the low level parts of their operating system to Rust Source. This makes sense in a lot of ways as Rust provides a lot of type safety and memory safety, which is something that C does not provide. The goal of this tutorial is to get familiar with Rust and to understand the best ways to implement this technology. Setting up the environment To set up our environemnt, we must first install rust. Install on mac: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
     Like  Bookmark