One of the interesting developer trends in Web3 is the emergence of Rust as a way to program blockchains. Rust, of course, is a popular programming language that has a wide range of uses – it’s the most popular language in Stack Overflow Annual Developer Survey for the last six years. So its uses in crypto are just part of what developers love it for. That said, if the blockchain Solana Needless to say, Rust could become a key battleground technology for the future of Web3.
Many in the Web3 world see Solana as a potential competitor to Ethereum as the leading platform for dapps (decentralized applications). At the time of writing, Solana is ranked seventh in market value on CoinMarketCap, a popular cryptocurrency index. It is definitely the highest ranked blockchain that uses Rust.
Before we get to Solana and Rust, a quick note on the “traditional” way to program a blockchain (I used quotes because this is all less than ten years old!). Ethereum was the first programmable blockchain and to this day is the foundational development environment for the small, growing Web3 ecosystem. To program something on Ethereum, you need to create a “smart contract” using a custom Ethereum language called Solidity. You then run the smart contract on the Ethereum Virtual Machine (EVM), Ethereum’s runtime environment.
How development works on Solana
Now let’s move on to how Solana approaches her blockchain programming. First of all, in his developer documentationSolana gets rid of the legal terminology of “smart contract” and brings us back to traditional software development language:
“In Solana, smart contracts are called programs. Rust C, C++ are the languages used to create programs that are chain-deployed.
When creating a dApp, Solana recommends using its official SDK, solana-web3.js, which, according to Solana Labs, “sounds like you’re talking to any other API you’ve used.” But there are other third-party SDKs that are also built on top of the JSON RPC API, including SDKs for Java, C#, Python, Go, Swift, Dart-Flutter, and Kotlin.
Why did Solana choose Rust?
In a recent episode from the YouTube show UpOnly, the founders of Solana Anatoly Yakovenko and Raj Gokal discussed why they chose to build Solana “programs” (aka smart contracts) with Rust, and not the already established solidity of Ethereum.
Yakovenko, who is Solana’s technical mastermind, first noted Rust’s popularity. “It’s not like we picked Haskell or anything like that,” he joked (a dig into Solana’s rival blockchain, Cardano, currently ranked 6th on CoinMarketCap, which chose Haskell). He went on to explain why they didn’t choose to build with Solidity and the Ethereum Virtual Machine (EVM).
“The hardest thing about EVM,” he said, “is that you’re going to get, like, really smart people to think full-time about […] how to build to scale? […] Or are you just going to have someone copy something from Solidity and then tokenize it? »
What Yakovenko means is that Solidity, in his view at least, attracts developers who are more likely to copy-paste smart contract code from existing blockchain projects (a practice known colloquially as “copypasta”). So by choosing Rust, which is a harder language to learn than Solidity and is much more likely to be used by professional programmers, they hope to attract developers who can create custom and scalable programs.
One of the co-hosts of UpOnly, a popular crypto influencer who goes by the name Coby (real name Fish of Jordan), noted that it could also go the other way – that inexperienced Rust developers could mess up building a program and potentially cost users a lot of money. To this, Yakovenko replied that “we have a lot of community reviews”, made up of experienced developers who “will identify every bug they can find”.
Recent Solana Technical Issues
It’s a good time to mention that Solana has been experiencing troubling network issues recently. Fortune reported last week that Solana “suffered its sixth serious outage of more than eight hours this month.”
Other blockchains have also encountered problems, often due to an inability to scale. “Ethereum continues to be plagued by scaling challenges and extremely high gas fees,” Fortune wrote, “while newcomers like Polygon PoS have seen their costs rise more than sevenfold. in a month in January, as play-to-earn video games clogged demand.”
In a Twitter feedYakovenko blamed Solana’s troubles on “liquidation robots” […] spam the network. This suggests that the outages are more related to cryptocurrency trading shenanigans than any issues with scaling programs on Solana. Either way, it highlights the dangers of developing apps on a blockchain. The likes of Solana – and even Ethereum – are still very new as development platforms.
Update, February 3: After this article was published, the Solana blockchain was involved in a hack that resulted in the theft of approximately $300 million worth of wETH (“wrapped” Ethereum). This Twitter thread contains the details:
Good. I figured out the Solana x Wormhole Bridge hack. ~$300M worth of ETH drained from Wormhole Bridge on Ethereum. Here’s how it happened.
— smart contracts (@kelvinfichter) February 3, 2022
Solana Developer Community
Technical issues aside, Solana seems to have a thriving developer community. It’s one of the top five blockchain projects for Web3 development, according to a recent report of the electric capital. Also, based on data analysis per the Cloud Native Computing Foundation (CNCF), Lawrence Hecht of The New Stack reported that Solana “demonstrates project speed on par with stalwarts of the open source community”.
Solana also did a good mileage a hackathon he raced last June. The winner of the “Web3 track” was an app calledSolariumdescribed as “fully decentralized, end-to-end encrypted and censorship-resistant instant messaging based on the Solana blockchain”.
The app looks pretty sleek, but there is a catch (and it’s the same catch on any encryption app) – using the product costs money. As co-creator Daniel Kelleher noted on the demo video“every message on Solarium is a transaction on the Solana blockchain.”
Whether Solana’s adoption of Rust actually translates to more high-quality blockchain dApps, compared to rival platforms like Ethereum and Cardano, remains to be seen. Even if that’s the case, there’s the lingering dApp usability issue to contend with. Examples like Solarium are great test cases, sure, but new users are unlikely to flock to them as long as it’s paid.
Characteristic picture via Pexels.