Markets by Trading view

Why Rust is taking Web3 by storm

Facebook
Twitter
LinkedIn

Rust has been gaining momentum with many companies switching their languages over to Rust. The programming language is praised for its efficiency and high performance, but also its code safety. A 2022 Stack Overflow Developer Survey of 80,000 developers revealed Rust is the most favoured programming language, and is gaining more popularity with new developers. It is also being used for different blockchain networks, including Polkadot and Solana. So why is this the programming language of choice for blockchain pioneers? And where did it come from?

The Birth of Rust

Graydon Hoare started building the Rust Language after the elevator in his apartment block broke down. Hoare knew these elevators were written using C+ and C++ which allow code to be written swiftly, but are are also prone to memory bugs and crashes. Hoare then developed Rust: a small, fast code without memory bugs named after resilient and tough fungi.

In 2022, 2.2 million coders used Rust, and its popularity is consistently growing with new developers. Software developer George Manning told Disruption Banking: “The tooling, pattern matching control flow, the type system and traits make Rust really enjoyable to use.

When coming from another language it can be a bit frustrating when the compiler complains about errors all over the code. But once you get used to the rust idioms, everything just makes sense.”

Blockchain and Rust

Blockchains are all about innovation and constant development. Rust is ideal for Web3 as it is secure, efficient, and fast with minimal bugs. In addition, Rust works well for large organisations and is being developed by teams where multiple users are using the blockchain. Recently, this has often been in conjunction with AWS as a cloud server.

Rust has fewer memory bugs and issues and saves time for developers. Instead of focusing on identifying and sorting out bugs, they can focus on the programme’s logic and how to innovate. It is also a compiled language, which means it is converted directly into machine code that the processor can execute and is compatible with other languages, getting rid of the middle man. The integrated package manager and automatic formatting tool support developers in achieving higher levels of efficiency. In simpler terms for Web3 developers, Rust is a popular choice as it is energy and time efficient, providing tools which optimises workflow. So what blockchains are using Rust and how has their performance been in comparison to those who are not?

Polkadot, which recently partnered with social network MeWe making it a social platform on Web3 using a Decentralised Social Networking Prototype, is an interoperable smart contract based on a blockchain. Due to its parachain, it is easy to interoperate with multiple blockchain networks. Alongside Rust, the Polkadot team uses Javascript, C++, and Go. Solana also uses Rust. Founders Anatoly Yakovenko and Raj Gokal explained in a YouTube video that their choice of Rust attracts better developers: “The hard part with EVM, is are you gonna get, like, really smart people full-time thinking about […] how do I build in scale? […] Or are you just going to get somebody that copies something from Solidity and then slaps a token on it?”

Yakovenko suggests that other languages such as Solidity attract developers that are more likely to copy-and-paste smart contract code from existing blockchain projects. So by choosing Rust, which is a harder language to learn, it is much more likely to be used by professional programmers. He is therefore hoping to attract developers who can build customised, scalable programs. In turn, having better developers will mean innovation will be faster and cost effective.

Manning shared his view on why the popularity of Rust has grown in the Web3 space: “I believe the popularity is growing, especially in Web3, due to all its features. And the memory safety and performance are really important.”

There are of course areas which are less popular in Rust. Manning told Disruption Banking that “the only thing that could possibly be a drawback is generally the compiler will force you to write somewhat correct or safe code. And that could hinder dev performance for “proof of concept” and prototypes. But even then if you want to write unsafe code quickly you can get around that too.”

Rust is proving to be a popular language choice and is consistently popular with both developers and innovators. The positives in it outweighs its drawbacks and it is proving a tool to distinguish different levels of developers. Innovation is at the core of most Web3 projects and Rust continues to secure a loyal following from developers to founders.

Author: Bronwen Latham

#Rust #Programming #Web3 #Blockchain #Polkadot #Solana

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Trending

Write your email to verify subscription

Loading...

Sign up for our free newsletter and receive the latest banking and fintech stories, straight to your inbox - every week