Cointime

Download App
iOS & Android

Solidity vs Move vs Rust: The Evolution of Smart Contract Programming Languages

Validated Media

The security, speed, and developer activity of a blockchain are contingent on its underlying programming language and virtual machines. Two of the most popular programming languages are Solidity, used to build decentralized applications for the Ethereum Virtual Machine (EVM), and Rust for dApps on Solana.

However, since the latest emerging smart contract-based blockchains, Aptos and Sui, utilize Move as their foundation for a more secure and scalable layer 1, it’s only fitting to do a side-by-side comparison of all three.

Coding terminology

High-level languages (HLL)

HLLs are usually easier for developers to read and write in, as they more closely resemble human language compared to low-level languages which are closer to machine code. For a computer to read and execute the source code, it first needs to be compiled into machine language.

Low-level languages (LLL)

LLLs are more difficult for developers to read and write in, as they resemble machine code. As such, they can convert to machine code without an intermediate compiler or interpreter.

Runtime environment

On blockchains, virtual machines serve as the operating system runtime environment.

Interpreted or compiled programming languages

Programming languages distinguish themselves as interpreted or compiled languages.

A compiled programming language needs to be converted from the source code into executable bytecode.

An interpreted programming language, on the other hand, is being read and executed line by line at runtime by an interpreter.

As a result, interpreted languages are typically slower than compiled languages. However, interpreted languages are less prone to bugs, as the debugging of the code occurs at runtime and the intermediate compiled representation is removed.

In a compiled language, compiler bugs can occur even when the source code is flawless, so they are more prone to errors.

Sequential or parallel processing

Today, most major blockchains use sequential execution of transactions, meaning that the runtime environment can only process one transaction at a time. This is a major bottleneck for network throughput.

In contrast, some programming languages enable parallel processing (or parallel execution), allowing for much higher TPS compared to sequential processing without the need for mathematically driven solutions like zero-knowledge proofs.

Parallel execution identifies independent transactions to execute them concurrently. Dependent transactions, however, would affect the execution of another and therefore must be executed in sequence.

Solidity — the programming language for EVM smart contracts

Ethereum is the first programmable blockchain, which to this day remains the foundational development environment for the Web3 ecosystem growth. In order to program on Ethereum, you need to first create a “smart contract” by utilizing Solidity — a custom language specifically designed by Dr. Gavin Wood for smart contracts on Ethereum in 2014. The smart contract is then run on the Ethereum Virtual Machine (EVM).

As an HLL, Solidity makes software development more user-friendly. Additionally, Solidity is influenced by and similar to other popular languages such as C++, Java, and Python, making it easier for new developers to start developing in the EVM ecosystem.

However, as a compiled language, Solidity is more prone to bugs due to the additional steps necessary to translate it into machine-readable bytecode. As a result, and despite the extremely complex and costly audits that smart contracts undergo, we continue to see smart contract exploits in the Ethereum ecosystem.

Today, Solidity is an independent open-source project that is further refined and developed on GitHub. While it is not the only language that can be used to write code for Ethereum, Solidity’s syntax is specifically designed to target the EVM.

Advantages of Solidity

  • HLL and thus easier to learn and user-friendly
  • Abundance of good developer tools and open-source libraries
  • The most used language in Web3
  • Similar to languages like C++, Python, and JavaScript
  • Developers are less likely to make mistakes in languages they are already familiar with
  • Good community support
  • Existing standards (ERC20 and ERC 721)
  • Multichain compatibility (layer-two blockchains, sidechains and EVM-compatible layer-one blockchains)

Disadvantages of Solidity

  • As a compiled language, Solidity is more prone to exploitable bugs
  • Sequential processing is a bottleneck for network throughput

Solidity Adoption

At the time of writing, Solidity accounts for 87.45% of all total value locked in smart contracts, followed by Vyper (8.95%) and Rust (2.31%)

Rust — Solana’s primary programming languages

While many ecosystems are trying to attract new developers by being EVM compatible, Solana has taken a different path with its own unique programming language, which has seen impressive growth in adoption since launch.

Launched in 2011, Rust, unlike Solidity, was designed from the ground up as a general-purpose programming language and is not limited to smart contract programs.

Rust is a compiled, low-level and more complex programming language compared to Solidity. As such, it may be less attractive to new developers as it is more difficult to learn. However, many developers outside the Web3 ecosystem are already proficient with Rust, making it easier to start working on Solana or Near projects.

Rust is best known for being the primary programming language of Solana where it helps to achieve throughput that other blockchains can only dream of. For many, it is also a more powerful, versatile language compared to Solidity as it allows developers to manage memory effectively and leverage parallel processing.

Advantages of Rust

  • As a machine-oriented, compiled language, Rust offers high speed and good memory efficiency
  • Rust allows to achieve higher throughout with parallel processing
  • Rust achieves memory safety through the principle of ownership and borrowing, eliminating memory-related errors at compile time
  • As Rust developers are often more experienced developers, smart contracts (called programs) on Solana can be expected to be less prone to bugs

Disadvantages of Rust

  • As an LLL, Rust has a steep learning curve and is generally more difficult to learn
  • Program compilation for larger projects can take up to 10 minutes
  • Today, just a handful of blockchains support Rust, namely Solana and Near

Rust adoption

While blockchains using Solidity as their main programming language continue to have the largest share of active developers, Solana is currently seeing faster growth than Ethereum.

Move

Launched in 2019, Move is one of the most modern programming languages used in new layer-one chains like Aptos and Sui. Move is based on Rust, but was specifically designed by Meta for its Diem blockchain to solve the problems of existing smart contract languages.

As such, the team behind Move had the opportunity to examine the existing languages of the Web3 space and learn from their shortcoming.

Above all, Move is designed as an object-oriented language to write smart contracts or programs with safe resource management. Assets are defined as a “resource”, which can be moved between accounts, but which cannot be double-spent or duplicated.

This makes it very easy to write error-free code, in contrast to Solidity, where transfers of assets must be specified manually, increasing the likelihood of writing faulty code.

As such, Move eliminates the possibility of reentrancy attacks, which is one of the worst possible attacks on Solidity smart contracts.

As an interpreted language, Move’s performance is slower compared to compiled languages. However, the lack of a compiler and compiler bugs makes Move inherently more secure than Solidity.

In addition, Move inherits Rust’s memory efficiency and parallel processing, making it a solid choice for overall performance.

Advantages of Move

  • Like Rust, Move allows users to achieve higher throughput with parallel processing
  • As an interpreted language, Move doesn’t have a compiler, and as a result no compiler bugs
  • Move was designed with security in mind and aims to eliminate vulnerabilities such as reentrancy

Disadvantages of Move

  • New language with limited tooling, resources, and community
  • Harder to learn than a high-level language
  • Interpreted languages are generally weaker in performance than comparable compiled languages
  • No multichain compatibility as no major blockchain has adopted Move to date

Move Adoption

Aptos and Sui are currently the only blockchain projects using Move as their primary programming language and it is still too early to say how successful the language will be.

Conclusion

Solidity is the most popular programming language for blockchain development due to its user-friendliness and its widespread use on Ethereum. However, it has several vulnerabilities that have caused costly mistakes in the past. In contrast, Rust and Move are interesting alternatives due to their increased security and efficiency.

While Rust already offers better performance on Solana and shows impressive adoption, Move was designed to provide the most secure solution of the three, eliminating many of Solidity’s vulnerabilities.

It is important to remember that all three languages are relatively new. Potential security pitfalls are yet to be discovered and their long-term success remains to be seen.

While providing the foundation for smart contract development, programming languages are only one factor determining the speed and security of a blockchain and its dApps.

Comments

All Comments

Recommended for you

  • BTC Falls Below $71,000

    Market data shows that BTC has fallen below $71,000, currently priced at $70,997.18, with a 24-hour decline of 0.52%. The market is experiencing significant volatility, so please ensure proper risk management.

  • BTC Drops Below $71,000

    Market data shows that BTC has fallen below $71,000, currently priced at $70,989.94, with a 24-hour increase of 4.15%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Ethereum Foundation Plans to Sell 5,000 ETH to Fund R&D, Grants, and Donations

    On April 8, the Ethereum Foundation announced on the X platform that it will exchange 5,000 ETH for stablecoins today using CoWSwap's TWAP feature, as part of its ongoing efforts to fund research and development, grants, and donations.

  • Iran to Charge Fees for Vessels Transiting the Strait of Hormuz, Payments Acceptable in Digital Currency

    According to market news, Hamid Hosseini, spokesperson for the Iranian Oil, Gas and Petrochemical Exporters Union, stated on Wednesday that during a two-week ceasefire, Iran will require vessels to pay a toll to transit the Strait of Hormuz. All goods will be allowed to pass, but the clearance procedures for each vessel will take time. Each tanker must first send the details of its cargo via email to be informed of the fees, which can be paid using digital currencies, including Bitcoin.

  • Polygon Labs in Talks to Raise $100 Million for Payment Business

    According to informed sources, blockchain developer Polygon Labs is in early discussions with investors to raise up to $100 million to build a new stablecoin payment business. Polygon serves as the underlying blockchain for the prediction market Polymarket and other crypto platforms. This fundraising effort comes at a time when the cryptocurrency market is sluggish, and for Polygon, expanding into new business areas will help it break free from the stagnation of the cryptocurrency market and achieve business diversification.

  • BTC Surpasses $72,000

    Market data shows that BTC has surpassed $72,000, currently priced at $72,003.73, with a 24-hour increase of 5.37%. The market is highly volatile, so please ensure proper risk management.

  • Trump: Discussing Tariffs and Sanctions with Iran, Uranium Enrichment to be Banned

    On April 8, Trump stated that the United States will work closely with Iran, asserting that a highly effective regime change has been identified in Iran. Uranium enrichment activities will be banned, and the U.S. will collaborate with Iran to excavate and remove all deeply buried nuclear 'dust' (dropped by B-2 bombers). These areas have been under extremely strict satellite surveillance (monitored by the Space Force) now and always. Since the day of the attack, nothing has been disturbed. We are and will continue to discuss tariff and sanction relief matters with Iran. Many items in the content from 3 PM have already been agreed upon.

  • Trump: US Can Easily Resume Military Action Against Iran if Negotiations Fail

    US President Trump stated on the 8th that if negotiations between the US and Iran do not go well, the US will be able to easily resume military actions against Iran. (Xinhua News Agency)

  • US Spot Ethereum ETF Sees $64.61 Million Net Outflow

    On April 8, according to monitoring by Trader T, the US spot Ethereum ETF experienced a net outflow of $64.61 million yesterday.

  • Iran Reveals Core Content of Ten-Point Plan Submitted to the U.S. via Pakistan

    On April 8, the Supreme National Security Council of Iran issued a statement early in the morning, stating that based on the Supreme Leader's advice and the Council's approval, it accepted Pakistan's proposed ceasefire. The statement noted that Iran has achieved nearly all its objectives in this war, and the enemy has suffered a 'historic and complete defeat.' Iran will 'continue to fight until the great achievements it has made are consolidated and a new security and political landscape is established in the region.' It was also decided to hold negotiations in Islamabad to determine the details, aiming to 'consolidate the victory results through political negotiations within a maximum of 15 days.' The statement further indicated that Iran rejected all plans proposed by the enemy and formulated a ten-point plan submitted to the U.S. via Pakistan. This plan emphasizes several key points: coordinating with the Iranian armed forces to control passage through the Strait of Hormuz; ending the war against all members of the 'Axis of Resistance' and terminating the aggression of the Israeli regime; the withdrawal of U.S. combat forces from all bases and deployment points in the region; establishing a security transit protocol in the Strait of Hormuz to ensure Iran's dominance; full compensation for Iran's losses based on assessments; lifting all first and second-level sanctions as well as relevant UN Security Council resolutions; releasing all Iranian assets and properties frozen overseas; and finally, all these matters should be approved in a binding UN Security Council resolution.