Cyber attacks around the world are more than ever and is causing bigger problems. Cyber attacks used to be just espionage and other things that don't affect you if you don't use a computer but it has turned into a financial, economic and national security threat. The recent gas shortage in the US' east coast caused by a major gas pipeline, attacked by a ransomware, has shown us the greater harm these computer vulnerabilities may cause.
We need to adapt and solve these issues, as the world becomes more and more digital, especially after the pandemic, and now with digital money, whether it be cryptocurrencies or central bank-backed digital currencies, on the line.
One programming language though is causing great noise recently on solving a huge chunk of our current infrastructure issues, with security vulnerabilities that cybercriminals target for profit or information gathering.
You see most security vulnerabilities are caused by memory safety, about 70-80%, which is a very big number. There are many ways to mitigate these vulnerabilities but there are limitations and costs, like overhead, the reason why they can't really be implemented on everything, including critical ones, like operating systems or web browsers for example.
Low-level system programming where all our infrastructures are based on, the basic parts of your operating system for example, has always been complex and prone to errors, including security bugs, but there's already a language that can fix that.
The Rust language is originally from Mozila and now probably is their biggest contribution after the well-known open-source browser which is Firefox. It is a high-level language but has the control of a low-level language designed to be very high speed and guarantees memory safety.
Rust achieves memory safety without sacrificing speed by doing all the work at compile time. It does this through its type system and borrow checker.
It is so good that after a long time, there's already a candidate that can replace C with probably the biggest open-source project out there that a lot of us, whether we know it or not, depends on which is Linux.
There has been some efforts to put Rust on Linux though that is still on going. Linus Torvalds though, the creator and, historically, the main developer of the Linux kernel, acknowledged Rust, that's after calling C++ a terrible language and that it is used by a lot of unqualified programmers, which definitely gives Rust a boost, don't you think?
Google supports Rust already for low-level components of the Android Open-Source Project, as it indeed guarantees memory safety without sacrificing speed. Google has typically used C and C++.
The learning curve can be a bit steep, though, as Rust works a bit differently than other languges. They even have this term called "fighting the compiler". The advantages of the language, though, I think outweighs the benefits. Rust also focuses on correctness, so your code is most likely going to work if it compiles, as the compiler would usually alert you if it found something that isn't right. The compiler also has improved and is still improving. The way it provides errors are very helpful. In Rust, I think the magic is in the compiler.
Rust still though is a very young language. It's first stable release was just on 2015. The community though is growing rapidly, with Rust being the most loved language also on recent surveys, and many libraries has already been created, enough to support many projects that developers choose to write on it. We'll see what the future holds but great potential is really there.
That's all for this article and thank you for reading. It's actually 6 o'clock in the morning from where I am. I just couldn't sleep and spent the night doing all kinds of things. Hope you all have a good day though with me. I'll probably sleep soon after finishing this article.
Don't forget to subscribe!