Rust for Solidity Developers… Article 01
What is Rust, and why should a Solidity developer care?

smart contract developer
Introduction
Okay, so I decided to learn Rust.
I’ve been writing Solidity smart contracts for a while now and I got to a point where I kept running into Rust everywhere. Foundry is written in Rust. Reth is written in Rust. Every time I looked at Solana or NEAR or anything outside the EVM, the answer was Rust. And then I started looking into ZK proofs and guess what showed up again. At some point it stopped feeling like a coincidence and started feeling like something I needed to actually learn.
So here we are. Article 01 of what I’m planning to be a 28-part series, where I document everything as I go from zero Rust knowledge to actually building things with it. I’m writing this the way I personally learn best: compare it to what I already know, ask why things are designed the way they are, and be honest about the parts that confused me.
If you’re also a Solidity developer who keeps seeing Rust everywhere and finally decided to do something about it, this series is for you. Let’s figure it out together.
This first article is all concepts, no code yet. I want to build the mental model before I write a single line. By the end you should know what Rust actually is, why it was built, where it’s used in the real world (including the ZK and blockchain world you already work in), and what the journey ahead looks like.
What You Will Learn in This Article
By the end of this article, you will be able to:
Explain what Rust is and where it sits among other programming languages
Describe the core problem Rust was designed to solve (and why it matters to you as a blockchain developer)
Map Rust’s design ideas to concepts you already know from Solidity
Name real systems and companies running Rust in production
Understand Rust’s specific role in the blockchain, ZK, and Web3 ecosystem
Know what the next 27 articles will cover and in what order
Section 1: What is Rust?
The formal answer: Rust is a statically-typed, compiled, systems programming language that came out of Mozilla Research. First stable release, Rust 1.0, was in May 2015. It’s open source, governed by working groups under the Rust Foundation, with founding members including Mozilla, Microsoft, Google, Amazon, and Huawei.
That sentence is a lot, and when I first read it I didn’t really know what half of it meant. So let me break it down the way I wish someone had broken it down for me.
1.1 Breaking Down the Definition
Statically typed
Every variable has a type that the compiler knows before the program runs. If you try to add a number to a string, the compiler stops you. It refuses to build.
You already know this. Solidity works the same way. You declare uint256 or address and the compiler makes sure you only use them in ways that make sense. Compare that to JavaScript, where 1 + “2” silently gives you “12” and just moves on. Rust and Solidity both refuse that. The compiler is your first line of defense.
Compiled
Rust source files compile directly to native machine code, the actual binary instructions your CPU runs. There’s no virtual machine in between, unlike the EVM or the JVM. This is why Rust programs are as fast as C programs: nothing is translating anything at runtime.
Solidity is also compiled, but to EVM bytecode, which is instructions for a virtual machine rather than your actual hardware. Rust compiles all the way to the metal.
Systems programming language
A systems language is designed for software that lives close to the hardware: operating systems, databases, compilers, embedded firmware, web servers. These programs need precise control over memory and predictable performance with no surprise pauses.
Application languages like Python or JavaScript trade that control for convenience. Both are valid choices for different problems. Rust is for when you need the control and the safety at the same time.
1.2 The Three Core Promises of Rust
Rust is built around three design goals. Understanding them gives you a frame for every decision the language makes.
1.3 A Brief History
Rust started as a personal project by Graydon Hoare in 2006. He was a Mozilla employee who, according to the story, came home to find his building’s elevator broken because of a software memory bug. He decided to build a language where that class of bug was structurally impossible. Mozilla started sponsoring the project in 2009, and Rust 1.0 shipped in 2015.
Since then:
Rust has been the StackOverflow most-admired programming language for nine years straight (2016 through 2024). No other language is close to that streak.
In 2022, the Linux kernel officially accepted Rust as its second supported language alongside C. That’s the biggest change to Linux development in decades.
Microsoft, Google, Meta, Amazon, Cloudflare, Discord, and Dropbox all run Rust in production for performance-critical systems.
The US National Security Agency and the White House Office of the National Cyber Director have both publicly recommended Rust as a memory-safe alternative to C and C++.
Section 2: The Problem Rust Solves
This is the part where I had to slow down and actually think. As a Solidity developer, I never really had to care about memory management. The EVM handles all of that. But in systems programming, it is the central problem, and you cannot understand why Rust exists without understanding it.
2.1 Memory Management: The Core Problem
Every running program needs memory. Space to hold variables, data structures, the results of computations. That memory needs to be allocated when you need it and freed when you are done. Simple concept. Brutal in practice.
There are three traditional ways to handle this. Each one has a serious flaw:
2.2 An Analogy That Actually Helped Me
Think of a shared office printer. Three people all need to print something. Who is responsible for turning it off at the end of the day?
Manual management ©: You assign one person that responsibility. If they forget, the printer runs all night (memory leak). If two people both try to turn it off, they trip over each other (double-free bug).
Garbage collection (Java, Python): A building manager checks around periodically. Reliable enough, but they show up on their own schedule. You cannot promise the printer will be off by a specific time.
Rust’s ownership system: The rule is simple: the last person to use it turns it off. That rule is enforced at sign-out time. Nobody can forget. Nobody can do it twice. No manager needed. The contract is enforced at compile time, not at runtime.
2.3 Why This Matters in Practice
When I first read about memory safety bugs I thought it sounded academic. Then I looked up what they actually caused:
Heartbleed (2014): A buffer over-read in OpenSSL exposed private keys for millions of websites. Affected an estimated two-thirds of the entire internet.
Dirty COW (2016): A race condition in the Linux kernel let attackers escalate privileges on millions of Android devices.
EternalBlue (2017): A buffer overflow in Windows SMB became the foundation for the WannaCry ransomware attack, which hit over 200,000 systems worldwide.
All three of those would have been impossible to write in safe Rust. The compiler would have refused. That is not marketing language. That is the actual design guarantee.
Section 3: Rust for Solidity Developers
Here is the thing I didn’t expect: learning Rust as a Solidity developer is actually a good starting position. A lot of people come to Rust from Python or JavaScript and really struggle with how strict it is. You and I are already used to strict types, hard constraints, and the compiler saying no to things that seem fine but aren’t. We’re closer to the Rust mindset than we think.
3.1 Concepts We Already Know
3.2 Where Rust Goes Further
Solidity’s constraints live within one EVM execution context. Rust applies the same constraint-based thinking to general-purpose computing across the board. More ground to cover, but the foundation is real.
The big new ideas I’m going to have to wrap my head around:
Ownership and borrowing: Rust’s memory management system. The compiler tracks who owns each value. This is the hardest new concept in the language and we spend two full articles on it.
Lifetimes: Annotations that tell the compiler how long a reference is valid. Sounds scary. In practice, the compiler infers them most of the time.
Traits: Rust’s interfaces. I’m told I’ll recognize these immediately from Solidity interfaces and abstract contracts, and honestly, I believe it.
A deeper type system: Generics, enums that carry data, exhaustive pattern matching. More expressive than what Solidity gives us, and still fully checked by the compiler.
3.3 The Mindset Shift
The Mindset Shift
In Solidity, the compiler protects one function call from the outside world. Every require is a guard against a caller trying something they should not.
In Rust, the compiler protects an entire program from itself. Every ownership rule, every type constraint, every exhaustive match is a guard against the program doing something incorrect.
The shift is one of scope. Same philosophy, much bigger surface area.
Section 4: What Rust is Used For
One of the first things I wanted to know: who actually uses this in the real world? And the answer turned out to be basically everyone doing serious systems work. Here’s how it breaks down.
4.1 Systems and Infrastructure
Operating systems: Parts of the Linux kernel are now written in Rust. Google’s Fuchsia OS is largely Rust. Microsoft has been rewriting Windows components in Rust since 2019.
Web servers and networking: Cloudflare uses Rust in its edge network. AWS uses it in Firecracker, the microVM technology that runs AWS Lambda.
Databases: TiKV, InfluxDB, and SurrealDB are all written in Rust.
Browsers: Mozilla built the Servo browser engine in Rust, and significant parts of Firefox have been rewritten in Rust over the years.
4.2 WebAssembly (WASM)
Rust is the leading language for compiling to WebAssembly: a binary format that runs in browsers and on WASM-based virtual machines. This is directly relevant to what we already do:
NEAR Protocol: Smart contracts are written in Rust and compiled to WASM. If you build EVM contracts in Solidity, you would build NEAR contracts in Rust.
Polkadot and Substrate: The entire Substrate framework for building blockchains in the Polkadot ecosystem is written in Rust. Parachain runtimes compile to WASM.
CosmWasm: Smart contracts for Cosmos-based chains (Juno, Osmosis, Terra 2.0) are written in Rust and compiled to WASM.
Arbitrum Stylus: Stylus lets you write EVM-compatible smart contracts in Rust. This is the most direct bridge between your existing Solidity work and Rust development.
4.3 Blockchain Runtimes and Infrastructure
Beyond smart contracts, the blockchains themselves are increasingly built in Rust:
Solana: The entire Solana runtime is written in Rust. On-chain programs (Solana’s equivalent of smart contracts) are written in Rust using the Anchor framework.
Ethereum execution clients: Reth, built by Paradigm, is an Ethereum execution client written entirely in Rust. It’s consistently one of the fastest and most efficient Ethereum nodes available.
StarkNet: The Cairo compiler, which powers StarkNet contracts, is written in Rust.
Bitcoin tooling: The rust-bitcoin library and the Bitcoin Development Kit (BDK) are the standard choices for building Bitcoin applications.
4.4 Zero-Knowledge Proofs
This is the one that really got my attention. ZK proofs are having a moment in blockchain right now: ZK rollups, ZK identity, private smart contracts. And Rust is deeply embedded in this space in ways I didn’t realize until I started digging.
Here’s why Rust fits ZK so well: ZK proof systems involve extremely heavy computation. You’re doing polynomial arithmetic, elliptic curve operations, and hash functions at scale. These operations need to be fast and deterministic with no garbage collector pauses sneaking in at the wrong moment. That’s basically the exact problem Rust was designed to solve.
Halo2 (Zcash and Privacy Layer builders): Halo2 is a ZK proof system used by Zcash and several teams building private rollups. The library is written in Rust. If you want to build ZK circuits at the protocol level, you’re writing Rust.
Plonky2 and Plonky3 (Polygon): Polygon’s high-performance proving systems are written in Rust. Plonky3 is used as the foundation for several ZK VMs currently being built.
sp1 (Succinct Labs): sp1 is a RISC-V zkVM that lets you write provable programs in ordinary Rust. You write Rust, and the system generates a ZK proof that the Rust program ran correctly. This one blew my mind a little.
Risc0: Another zkVM where you write the guest program in Rust. The prover generates a proof of execution that can be verified on-chain.
Arkworks: A Rust ecosystem for building ZK proof systems from scratch. If Halo2 and sp1 are the frameworks, Arkworks is closer to the raw primitives: elliptic curve arithmetic, finite fields, constraint systems.
Noir (Aztec): Noir is a domain-specific language for ZK circuits. The Noir compiler is written in Rust. Knowing Rust helps you understand the toolchain even if you write circuits in Noir itself.
A Personal Note on ZK
I want to be upfront: I don’t fully understand ZK proofs yet. That’s actually one of the reasons I’m learning Rust. The ZK tooling you need to work with at any serious depth (Halo2, sp1, Arkworks) is written in Rust and assumes you can read Rust code. So in a way, learning Rust is also a prerequisite for going deeper into ZK. Two birds.
4.5 Developer Tooling
Some of the tools you already use every day are written in Rust:
Foundry: Yes, that Foundry. Forge, Cast, and Anvil. The entire Ethereum development toolkit is written in Rust. Every time you run forge test, you’re running a Rust binary.
ripgrep (rg): The fastest code search tool available. VS Code uses it under the hood for its search feature.
fd: A faster, friendlier replacement for the Unix find command.
Zed: A high-performance code editor written entirely in Rust.
Worth Knowing
The speed and reliability you take for granted in Foundry is not an accident. It’s a direct result of Rust’s design. Every time you run forge test or cast send, you’re already using Rust output. You just didn’t know it yet.
Section 5: Where Rust Sits in the Language Landscape
One of the things I find useful when picking up a new language is figuring out where it actually sits relative to everything else. Here’s how Rust stacks up across the dimensions that matter:
Section 6: Key Terminology Reference
I’m going to be honest: when I first started reading about Rust, there was a lot of vocabulary that slowed me down. Here’s the glossary I wish I had. Every single one of these gets a full article later in the series.
Section 7: What to Expect on This Learning Journey
I want to be straight with you about what’s ahead because I think it’s better to know going in.
7.1 The Borrow Checker
Most people hit a wall early in Rust called the borrow checker. This is the part of the compiler that enforces ownership rules. Early on, it rejects code that looks perfectly fine to you, and the error messages, while detailed, point at problems that don’t feel like problems.
I haven’t gotten there yet, but everything I’ve read says: this is normal. It’s not a sign you’re bad at programming. It’s a sign you’re building a new mental model, and the compiler is enforcing that model before you’ve fully internalized it. Every Rust developer goes through this phase.
What People Say After Getting Through It
Fighting the borrow checker is how you learn Rust. Once you internalize its rules, you stop fighting it, and then you realize it has been protecting you from bugs you didn’t even know you were writing.
This comes up in nearly every Rust developer’s reflection on learning the language. I’m holding onto it.
7.2 The Series Roadmap
Here’s how the 28 articles in this series build on each other:
Each article follows the same structure: concept explanation, Solidity comparison, code examples (starting from Article 02), practice exercises, and references. You can read them in order or jump to a specific topic, but the early articles build the vocabulary for everything that follows.
Section 8: Practice Exercises
No code in this article. But here are four things worth doing before Article 02 to lock in the mental model.
Exercise 1: Language Audit
Exercise 1
Pick a piece of software you use every day. Look it up on GitHub or in its docs and find out what language it’s written in. Pay attention to anything that mentions Rust.
Goal: Build intuition for how common Rust already is in software you depend on.
Stretch: Find a tool in the Ethereum development ecosystem that is written in Rust. Hint: you already ran it today.
Exercise 3: Blockchain Ecosystem Research
Exercise 3
Pick one of these and spend 20 minutes in the developer documentation:
NEAR Protocol (near.org/developers) — Rust smart contracts
Solana (solana.com/developers) — Rust programs with Anchor
Polkadot and Substrate (docs.substrate.io) — Rust blockchain framework
Arbitrum Stylus (docs.arbitrum.io/stylus) — Rust EVM contracts
sp1 by Succinct Labs (docs.succinct.xyz) — write Rust, generate ZK proofs
Write down:
What role does Rust play in that ecosystem?
What would you build differently compared to Solidity on the EVM?
What Rust-specific learning resources does that ecosystem provide?
Goal: Make the connection between Rust and blockchain concrete before you write a single line of code.
Exercise 4: Terminology Flash Cards
Exercise 4
Take the 14-term glossary from Section 6 and make flash cards. Anki, Notion, folded paper: whatever you’ll actually use.
Front: The Rust term. Example: Ownership.
Back: The explanation in your own words. Not copied from this article. If you cannot write it in your own words, re-read the definition and try again.
Goal: Active recall is how things actually stick. Writing the definition forces retrieval, not just recognition.
Section 9: Resources and Further Reading
These are the resources I’ve found most useful so far. Annotated so you know what you’re clicking into.
Official Documentation
The Rust Programming Language (“The Book”) — doc.rust-lang.org/book — The official, free, comprehensive introduction. Well-structured and written for developers coming from other languages. This is the primary reference for the whole series.
Rust by Example — doc.rust-lang.org/rust-by-example: Teaches Rust through annotated code examples. Great if you learn better by reading code than by reading prose.
The Rust Reference — doc.rust-lang.org/reference: The formal language specification. Too dense for beginners, but invaluable once you want to understand exactly how something works.
The Cargo Book — doc.rust-lang.org/cargo: Complete docs for Cargo, Rust’s build tool. You’ll need this from Article 02 onward.
Community Learning
Rustlings — github.com/rust-lang/rustlings: Small exercises to get comfortable reading and writing Rust. Run them in your terminal. Strongly recommended alongside this series.
Exercism Rust Track — exercism.org/tracks/rust: Mentor-reviewed exercises. Free, with optional feedback from experienced Rust developers.
This Week in Rust — this-week-in-rust.org: Weekly newsletter covering new crates, blog posts, and proposals. Good for staying current as you learn.
Rust in Blockchain and Web3
Anchor Book — book.anchor-lang.com: Official docs for Rust smart contracts on Solana. Good for seeing Rust applied in a context close to what you already know from Solidity.
NEAR Rust SDK Docs — docs.near.org/sdk/rust/introduction: Official docs for Rust smart contracts on NEAR. Very accessible for Solidity developers.
Reth Book — paradigmxyz.github.io/reth: Docs for the Rust Ethereum execution client. Good for understanding how Rust is used to build Ethereum infrastructure itself.
Arbitrum Stylus Docs — docs.arbitrum.io/stylus/stylus-gentle-introduction: Writing EVM-compatible contracts in Rust. The most direct bridge between your Solidity skills and Rust.
Rust and Zero-Knowledge Proofs
Halo2 Book — zcash.github.io/halo2: The docs for the Halo2 ZK proof system written in Rust. Dense, but this is where you end up if you want to build ZK circuits at the protocol level.
sp1 Docs (Succinct Labs) — docs.succinct.xyz: Docs for the zkVM that lets you write Rust programs and generate ZK proofs of their execution. Great entry point for understanding Rust in the ZK space.
Arkworks Documentation — arkworks.rs: The Rust ecosystem for ZK primitives: elliptic curves, finite fields, constraint systems. More foundational than Halo2 or sp1.
Risc0 Developer Docs — dev.risczero.com: Another Rust-based zkVM. Good for seeing a different approach to the same problem as sp1.
Background Reading
Memory Safety in Chrome (Google Security Blog) — security.googleblog.com: Google’s analysis showing ~70% of their high-severity security bugs are memory safety issues. Essential context for why Rust exists.
Why Discord Switched from Go to Rust (Discord Engineering Blog) — discord.com/blog: A concrete, readable case study of a real production Rust migration. Shows both the garbage collector problem and Rust’s solution in practical terms.
Oxide and Friends Podcast — oxide.computer/podcasts: Conversations about systems software. The episodes on Rust’s design history are worth the time.
Section 10: Summary
Here’s everything from this article compressed down to the parts that actually matter.
Key Takeaways
Rust is a systems programming language: It compiles to native machine code, has no garbage collector, and gives you direct control over memory, with the compiler making sure you don’t misuse that control.
Its three pillars are performance, reliability, and productivity: Not competing goals. Rust achieves all three by moving safety checks to compile time instead of runtime.
The core innovation is the ownership system: Instead of manual memory management or a GC, the compiler tracks memory lifetimes and inserts the right cleanup code automatically. Zero overhead, zero memory bugs in safe code.
Coming from Solidity is actually an advantage: Strict typing, no null, explicit error handling, immutability by default, deterministic execution. We already think this way. Rust extends those ideas to all of computing.
Rust is the language of modern blockchain and ZK infrastructure: Solana, NEAR, Polkadot, Reth, Foundry, Stylus, Halo2, sp1, Arkworks. The tools and chains we work with or want to work with are built in Rust or depend on it.
The learning curve is real and worth it: The borrow checker will push back early. This series is structured to make that phase as short and useful as possible.
Up Next: Article 02
Next Article
Article 02: Setting Up Your Rust Dev Environment
Next up we actually install Rust, configure VS Code or Cursor with rust-analyzer, look at what a Cargo project looks like on disk, and write the first actual Rust program. By the end, the environment is ready and we’ve run real Rust code.
Topics covered: rustup — cargo new — Cargo.toml — main.rs — cargo run — cargo build — rust-analyzer — Hello, blockchain!

