Rust logo

RustRover

Focus on what matters

Download
RustRover

Everything You Wanted to Ask About Rust – Answered by Herbert Wolverson

Disclaimer: This article was created using AI-based writing and communication companions. With its help, the core topics of this rich and nuanced livestream were conveniently distilled into a compact blog post format.

In our recent JetBrains livestream, Vitaly Bragilevsky sat down with Rust expert and educator Herbert Wolverson (Ardan Labs) to talk about everything Rust developers – beginners and pros alike – are curious about. From ownership and lifetimes to salaries and async programming, here’s a recap of the best questions and insights. Watch the full livestream replay on JetBrains TV and check out the GitHub repo with Herbert’s prepared answers and code samples. Below is a short summary of the 23 questions that were covered during the livestream.

Q1. What’s your new book about?

My latest book is Advanced Hands-On Rust, a follow-up to Hands-On Rust. The first book guided readers from beginner to early intermediate level, while the new one takes you further into advanced topics like generics, macros, and library design. You can find it on Amazon, Barnes & Noble, or directly from the publisher’s website for an eBook version.

“I felt like the first book got you to the end of beginner level and then stopped a little too early. This one takes you through intermediate and early advanced topics.”

Q2. What’s the biggest mindset shift when moving to Rust from C++, Java, or C#?

The biggest difference is thinking about memory. In Java or C#, the runtime handles garbage collection for you. In Rust, you explicitly manage memory – but safely. It’s closer to C++ in that sense, yet Rust prevents entire classes of bugs like data races or use-after-free.
Rust’s ownership model and smart pointers (like Box, similar to C++’s unique_ptr) give you precise control without a garbage collector. It’s a language built to make it impossible to shoot yourself in the foot in the usual ways.

“If you’re coming from Java or C#, memory sounds terrifying. You expect something horrific. But you can go days in Rust without explicitly managing memory.”

Q3. Is Rust really that hard to learn?

It used to be! Early Rust looked terrifying, full of strange symbols and lifetimes everywhere. Today, the syntax and ecosystem are much friendlier. You can build practical apps — like a small web server — without worrying about memory management at all. The learning curve still exists, but it’s much smoother thanks to improved libraries and tooling.

“I like to teach people so that by the end of day one, they’ve already built something useful.”

Q4. Should I learn C first or go straight to Rust?

You can start with Rust directly. C is lower-level, but Rust can be used at various abstraction levels. Long term, it’s best to learn multiple languages — not for competition, but for perspective.

“The most important thing isn’t the language — it’s that you actually learn something and build something.”

Q5. Will Rust gain widespread adoption soon?

It already is. The Linux kernel now officially includes Rust, which is a major milestone. I’m training more teams in defense, aerospace, finance, and automotive. Rust’s adoption is expanding rapidly.

“Linux ended their Rust experiment by saying: Rust is in the kernel now. Rust is going to be around forever. I fully expect to retire and still be called back to fix Rust code.”

Q6. How should beginners approach learning Rust?

A: Choose a learning style that fits you:

  • Books: Hands-On Rust, Rust in Action, Programming Rust.
  • Online Resources: The official Rust Book and Rust by Example (free on the Rust website).
  • Projects: Build something small and fun — games, scripts, or web services.
    Rust gives you multiple paths, so experiment and learn by doing.

“Some people learn from books, some from videos, some by just banging their head against the wall until it works.”


Q7. What are ownership and borrowing in Rust?

Think of it like lending your car:

  • If I move my car to you, it’s now yours — you can destroy it.
  • If I borrow it, you use it but must return it.
    This system prevents two parts of the program from destroying the same data or accessing it unsafely. It eliminates entire classes of memory errors common in C and C++.

“Rust makes it impossible for some other part of the program to destroy the car without either of us knowing.”

Q8. What does “zero-cost abstractions” mean?

It means you don’t pay a runtime cost for nice language features. Rust’s abstractions (like iterators, traits, and lifetimes) are compiled away — they help you write safer, clearer code without adding runtime overhead. What you write is as efficient as hand-optimized C code.

Q9. Should I use iterators or loops?

Use whichever you find clearer. Iterators are powerful and expressive, especially with libraries like rayon for parallelism. But if a simple for loop is more readable for you, that’s fine too. Performance is usually identical.

“Sometimes I write iterators. Sometimes I write loops. Either is fine.”

Q10. Can Rust be part of polyglot systems?

Absolutely. Rust integrates well with other languages using FFI (Foreign Function Interface). You can, for example, link Rust with C#, Python, or even databases like LanceDB. Use Rust where performance and memory safety matter most.

“You don’t have to throw the baby out with the bathwater. You can mix Rust with C#, Java, or whatever you already have.”

Q11. Which book should beginners start with — Hands-On Rust or Advanced Hands-On Rust?

Start with Hands-On Rust. It introduces concepts through game development examples. Once you’re comfortable, move on to Advanced Hands-On Rust for deeper topics like generics and macros.

Q12. How quickly should I learn async code?

Learn synchronous Rust first. Async Rust adds complexity under the hood — every async fn becomes a state machine. Once you’re comfortable with ownership and borrowing, move to async with frameworks like Tokio.

Q13. Why are there no exceptions in Rust?

Rust uses Result and Option types instead of try/catch. This forces you to handle potential errors explicitly rather than ignoring them. It’s a safer and clearer model. There’s talk about adding a throw keyword, but it’s unlikely to change this core philosophy.

“Rust wanted to make it harder to not check errors. With [Result], you at least have to acknowledge that something might have gone wrong.”

Q14. Why both Result and Option?

Because they express different ideas:

  • Option = something might be missing (e.g. user not found).
  • Result = something went wrong (e.g. database error). Sometimes you even see Result<Option<T>, E> — perfectly fine.

“They’re signaling intent. That’s why they’re different.”

Q15. Which external crates should I learn first?

  • serde – for serialization/deserialization (JSON, YAML, etc.)
  • colored – for simple CLI output formatting
    These crates are practical and teach how macros and traits work in real use.

“Serde is one of the crates that really got me into Rust. You add one derive and suddenly everything just works.”

Q16. Structs, enums, traits — when to use which?

  • Structs: group related data, like classes or records.
  • Enums: define a fixed set of possibilities, each possibly carrying data.
  • Traits: define shared behavior (like interfaces in other languages).
    Together, they form Rust’s type and abstraction system.

“Enums in Rust are much more powerful than in most languages — they can carry data and work beautifully with pattern matching.”

Q17. What’s pattern matching and why is it important?

Rust is strongly type-driven and pattern matching is central to Rust. It’s how you unpack Result, Option, or enum types safely. The match keyword ensures you handle all cases — the compiler even warns if you miss one. It’s similar to functional languages like Haskell or OCaml.

Q18. How to understand lifetimes easily?

Lifetimes track how long data lives to prevent dangling references. The compiler does most of the work now. If you need to write lifetime annotations manually, it’s often a sign your code is too complex. Tools like RustRover’s lifetime visualizer can help you understand them better.

“If I have to write a lifetime annotation, I start wondering if I made something too complicated.”

Q19. When to use references vs. smart pointers (Box, Rc, Arc)?

  • References (&): temporary, non-owning access.
  • Box: store large data on the heap.
  • Rc / Arc: reference-counted pointers for shared ownership (single- or multi-threaded).
    They’re ways to balance ownership, safety, and performance.

“Ownership is about who owns the data. References are about who’s allowed to look at it.”

Q20. Why is immutability the default in Rust?

Rust defaults to immutable variables to prevent accidental mutation — a common source of bugs. You can make variables mutable with mut when needed. It’s about safety and clarity, not restriction.

“It stops me from shooting myself in the foot by changing a variable somewhere deep in a function.”

Q21. How should I organize Rust projects?

Group related code into modules. Use mod.rs or mod files to define structure and expose only what’s needed with pub. Larger projects can be organized into workspaces. Think of modules as logical boundaries, not just files.

Q22. What are macros and when should beginners use them?

Macros generate code at compile time — for example, println! is a macro.
They come in two kinds: declarative (macro_rules!) and procedural (derive, proc_macro). Use them when you need repetitive boilerplate or metaprogramming, but sparingly – they can make code harder to read and harder for IDEs to analyze.

“You can do amazing things with macros. You can also do terrible things. But don’t.”

Q23. Will Rust ever “rust”?

Hopefully not! But like all languages, it will evolve. The team is good at deprecating old features gracefully, so the language should age well.

“Every language ages. Rust just makes it easier to get rid of old ideas than most.”

Rust’s learning curve is real, but its ecosystem, documentation, and community make the journey smoother than ever.

image description