Rust Lang is the Future

Technology Oct 31, 2021

In the past, cyber attacks were mainly associated with espionage and other activities that didn't affect you if you didn't use a computer. However, they have evolved into a significant threat to financial, economic, and national security.

The recent gas shortage on the US East Coast, caused by a major gas pipeline that fell victim to a ransomware attack, highlights the significant harm these computer vulnerabilities can inflict. It is imperative that we adapt and address these issues, particularly as the world becomes increasingly digital due to the acceleration brought about by the pandemic. With digital currencies, whether cryptocurrencies or central bank-backed digital currencies, now in play, fixing the vulnerabilities in the systems that underpin our society becomes even more crucial.

One programming language, however, is recently gaining attention for addressing a significant portion of our current infrastructure issues, specifically the security vulnerabilities that cybercriminals target for profit or information gathering.

You see, most security vulnerabilities, about 70-80%, are caused by memory safety—an alarming percentage. While there are various ways to mitigate these vulnerabilities, there are limitations and costs, such as overhead. This is why they can't be implemented universally, including in critical systems like operating systems or web browsers. Low-level system programming, upon which all our infrastructures are based—the fundamental components of your operating system, for example—has always been complex and prone to errors, including security bugs. Fortunately, there is already a language that can address these issues.

The Rust language, originally from Mozilla, is arguably their most significant contribution to the world after the well-known open-source browser, Firefox. It is a high-level language but with the control of a low-level language, designed to be very high speed while guaranteeing memory safety.

Rust achieves memory safety without sacrificing speed by ensuring that your code is completely safe at compile time. It accomplishes this through its type system and borrow checker. It is so effective that, after a considerable amount of time, there is already a candidate that could potentially replace C in probably the biggest open-source project out there—Linux, on which many of us, whether we realize it or not, depend.

There have been ongoing efforts to integrate Rust into Linux. Linus Torvalds, the creator, and historically, the main developer of the Linux kernel, has acknowledged Rust. This acknowledgment comes after he referred to C++ as a terrible language, used by many unqualified programmers. This definitely gives Rust a boost, don't you think? Google already supports Rust for low-level components of the Android Open-Source Project, as it guarantees memory safety without sacrificing speed. Traditionally, Google has used C and C++.

The learning curve can be a bit steep, though, as Rust operates somewhat differently than other languages. They even have this term called 'fighting the compiler.' Despite this, I believe the advantages of the language outweigh the challenges. Rust also prioritizes correctness, so if your code compiles, it's likely to work, as the compiler typically alerts you to any issues. The compiler has been improved and is still evolving. The way it provides errors is very helpful. In Rust, I think the magic lies in the compiler.

Despite being a very young language, with its first stable release in 2015, Rust has seen rapid growth in its community. It has consistently been ranked as the most loved language in recent surveys. Many libraries have already been created, providing ample support for various projects that developers choose to undertake in Rust. We'll see what the future holds, but there's undeniably great potential.

That's all for this article, and thank you for reading. It's currently 6 o'clock in the morning where I am. I just couldn't sleep and spent the night doing all kinds of things. Hope you all have a good day. I'll probably sleep soon after finishing this article.

Don't forget to subscribe!

Tags