What is Arbitrum's newly released development environment Stylus?
Written by: Offchain Labs
Compiled by: @hicaptainz
Abstract: Today, we released the code and public testnet for Arbitrum Stylus, enabling developers to build applications on the Arbitrum Nitro chain using traditional EVM tools and WASM-compatible languages such as Rust, C, and C++. Additionally, by improving computational, storage, and memory efficiency, Stylus significantly reduces gas fees and makes previously impractical resource-intensive blockchain use cases, such as alternative signature schemes, larger generative art libraries, C++-based games, and compute-intensive AI models, possible. The open-source SDK is now available, and we will host a Stylus Hackathon at ETHGlobal NY with a total prize pool of $20,000.
Why We Are Excited About Stylus
Around this time last year, we took a significant step forward with the release of Arbitrum Nitro; today, we take another important step with Stylus.
At the core of Stylus is EVM+: bringing together the best features of both the EVM and WASM worlds. Developers can still enjoy all the advantages of the EVM, including its ecosystem and liquidity, while gaining efficiency and access to existing libraries in Rust, C, and C++. All of this is achieved without changing how the EVM operates. The equivalence of the EVM is no longer a ceiling but a starting point.
Comparing EVM and EVM+
With the ability to expand from around 20,000 Solidity developers to millions using Rust and C, while maintaining full interoperability and composability with traditional EVM contracts, achieving faster execution times, lower gas, and new use cases—all on the most secure, decentralized, and widely used Ethereum L2 chain—we are excited to collaborate with the community to explore future directions.
To support innovative launches, the Arbitrum Foundation is providing R&D grants for Stylus.
In the coming months, you will hear a lot from us about Stylus, so let’s take a look at some highlights…
What is Being Announced?
The availability of the Arbitrum Stylus testnet, a new technical implementation that allows developers to build smart contracts using Rust, C, and C++, in addition to the previously provided EVM languages. We have also made the code public on our GitHub repository.
Start building with Stylus now, and we invite you to join the Stylus community on Discord to share your feedback and experiences.
Who is Stylus Designed For?
Stylus is designed for experienced Web 3 developers interested in using additional WASM languages like Rust, C, and C++ that are compatible with the Arbitrum chain, as well as for developers who may not be very familiar with blockchain development.
Stylus is suitable for Solidity developers looking to achieve cheaper computation and memory for their dApps.
Stylus is also for blockchain developers familiar with Rust environments like Solana and NEAR, who want the benefits of working in the EVM.
If you want to deploy industry-standard cryptographic libraries, such as the secp256r1 curve, Stylus is also for you.
What Are the Key Features of Stylus?
Native Ethereum development with popular programming languages: Build your applications on Arbitrum's large ecosystem using popular WASM-compatible languages like Rust, C, and C++, allowing you to combine widely used Web 2 programming languages with the most widely used L2 smart contracts.
One chain, multiple languages: Stylus allows you to use multiple programming languages on one chain. Developers no longer need to choose a blockchain that supports their preferred programming language; everything happens on the same chain.
Full composability: Solidity contracts and WASM programs are fully interoperable. If working in Solidity, developers can call Rust programs or rely on other dependencies in different languages. If working in Rust, all Solidity features are directly accessible.
Faster computation, lower costs: With Stylus, Rust, C, and C++, WASM computational operations run significantly faster than their Solidity counterparts. Computation improves by over 10 times. Memory improves by over 100 times.
Enabling new use cases: The computational speed, improved cost efficiency, and access to a mature WASM ecosystem open up previously impractical new EVM use cases. Cryptographic libraries can now be deployed as custom precompiles without permission. RAM-intensive generative art libraries, existing games written in C++ being brought on-chain, and compute-intensive AI models become much more accessible.
Designed for greater security: WASM programs written with the Stylus Rust SDK are more secure against reentrancy when chosen. Reentrancy is a common vulnerability that developers can only attempt to mitigate in Solidity. In Stylus, reentrancy is disabled by default unless intentionally overridden.
What Makes Stylus Unique?
Tailored for Arbitrum: Stylus allows you to develop in WASM while maintaining the maturity, security, and scalability of Arbitrum, the largest scaling solution for Ethereum.
Collaboration with Arbitrum Orbit L3 chains: For greater customization, Stylus can be used in conjunction with the Arbitrum Orbit development framework, enabling you to support popular WASM-compatible programming languages on your dedicated Orbit chain.
The largest developer and partner community: By supporting the Arbitrum chain, Stylus stands within the largest Ethereum L2 ecosystem, leveraging the support of its protocols, community, and partners.
Instant blockchain and Rust tool support: Stylus enables you to start developing immediately, with support for block explorers and Rust CLI tools included at the first testnet launch. Stylus also includes an open-source SDK designed for Rust, C, and C++, with the potential to expand to other languages like Move, Sway, Cairo, and Go.
How Does Stylus Save Money and Time?
Reduce your gas fees: WASM programs are more efficient compared to using Solidity, further lowering gas fees.
Lower memory and storage costs: In addition to more efficient computational operations reducing gas fees, memory in Stylus is also more economical. The cost of allocating several megabytes of RAM in Stylus is 1/100 to 1/500 of the cost in Solidity. Stylus can also automatically use Rust's borrow checker to safely reduce storage operations, further lowering costs.
Use existing libraries: There is no need to rewrite code to achieve the same functionality as existing libraries. Existing libraries in Rust, C, and C++ can be deployed with minimal modifications.
What Happens Next?
Trail of Bits Audit: Trail of Bits will audit the source code of Stylus to ensure the security of contracts and the Stylus SDK.
DAO Voting: As both Arbitrum One and Arbitrum Nova are managed by a DAO, whether to upgrade to support Stylus will be decided by DAO vote.
Join our AMA: Please join us on September 7th to check out our latest discussion about Stylus on YouTube and ask us questions.
Win Rich Prizes at ETHGlobal NY: We will award $20,000 for Stylus at ETHGlobal NY from September 22nd to 24th, so come join this exciting event and meet the Stylus team!