Email the Author

You can use this page to email Behrang Saeedzadeh about Mastering Rust for Java Programmers.

Please include an email address so the author can respond to your query

This message will be sent to Behrang Saeedzadeh

This site is protected by reCAPTCHA and the Google  Privacy Policy and  Terms of Service apply.

About the Book

If you're a Java developer looking to learn Rust, you already know the language's reputation: powerful, safe, but notoriously difficult to learn. This book takes a different approach—instead of overwhelming you with ownership rules and lifetimes from day one, it uses the Spiral Learning System to teach Rust progressively through focused domains.

This is Spiral 1, which teaches Rust through the lens of printing and formatting output. Future spirals will expand to cover the entire Rust language, building on the solid foundation established here.

Why start with printing? Because it's something you use constantly, from your first "Hello, World!" to debugging complex production systems. By exploring Rust's printing and formatting system in depth, you'll naturally encounter and master the language's core concepts—ownership, borrowing, traits, generics, and error handling—in practical, immediately useful contexts. These fundamentals prepare you for any aspect of Rust programming.

What Makes This Book Different:

- Built for Java Developers: Every concept is explained through direct comparisons to Java. You'll see how Rust's `Display` trait relates to `toString()`, how `Result` compares to checked exceptions, and how Rust's formatting system differs from `String.format()` and `printf()`.

- Spiral Learning System: Following Jerome Bruner's spiral curriculum theory, concepts are introduced simply, then revisited with increasing depth. You'll glimpse `impl` blocks early, explore them in detail later, then apply them with confidence in advanced scenarios.

- Hands-On Throughout: Every concept is demonstrated with complete, runnable code examples. You'll build real formatting implementations, write custom `Display` and `Debug` traits, and explore performance optimizations with actual measurements.

- Focused Yet Comprehensive: Rather than trying to cover all of Rust at once, Spiral 1 focuses deeply on printing and formatting. This creates a coherent narrative thread that naturally introduces Rust's type system, trait system, error handling, and performance characteristics—all the fundamentals you need to continue learning Rust or to dive into future spirals as they're released.

What You'll Learn:

Starting from basic console output, you'll progress through Rust's formatting machinery, learning to:

- Master `print!`, `println!`, `format!`, and the `write!` family of macros

- Implement `Display` and `Debug` traits for custom types

- Control formatting with precision, padding, alignment, and custom specifiers

- Write output to files, network streams, and in-memory buffers

- Build efficient string formatting with zero allocations

- Apply performance optimizations based on actual profiling data

By the end of Spiral 1, you won't just understand Rust's printing system—you'll have internalized the ownership model, trait system, and error handling patterns that make Rust powerful. These fundamentals form the foundation for everything else in Rust, whether you continue with future spirals or explore Rust independently.

Who This Book Is For:

This book is designed for Java developers with solid programming fundamentals who want to learn Rust. You should be comfortable with:

- Object-oriented programming concepts (classes, interfaces, inheritance)

- Java's type system and generics

- Basic I/O operations and exception handling

- Reading and writing code in any C-family language

No prior Rust experience is required—just a `cargo new` "Hello World" project and curiosity about systems programming.

Spiral 1 Structure:

Spiral 1 is organized into five progressive parts:

1. Foundations - Understand Rust's output model and macro system

2. Basic Printing - Master console output and basic formatting

3. The Formatting System - Explore traits, format specifiers, and string building

4. Custom Types and Advanced Output - Implement custom formatting and write to any destination

5. Performance and Best Practices - Optimize for production and apply advanced techniques

Each part builds naturally on the previous, with concepts reinforced through practical examples and Java comparisons. Future spirals will continue this progressive approach, expanding into other domains of Rust programming.

Why Start with Spiral 1:

Rust is becoming essential for performance-critical systems, cloud infrastructure, and embedded development. But learning Rust shouldn't mean fighting the compiler for weeks before writing useful code. Spiral 1 gives you a structured, focused entry point—teaching you core language features through a practical, immediately useful domain.

Whether you're evaluating Rust for your next project, migrating Java services to Rust for performance, or simply curious about systems programming, Spiral 1 provides the solid foundation you need. Master the fundamentals through printing and formatting, then apply that knowledge across the entire Rust ecosystem.


About the Author

Behrang Saeedzadeh’s avatar Behrang Saeedzadeh

@rust4java_book

I am an enterprise Java and Web developer with more than 20 years of experience writing programs and applications for banks, insurance companies, the media, and the public sector.

Logo white 96 67 2x

Publish Early, Publish Often

  • Path
  • There are many paths, but the one you're on right now on Leanpub is:
  • Rust-for-java › Email Author › New
    • READERS
    • Newsletters
    • Weekly Sale
    • Monthly Sale
    • Store
    • Home
    • Redeem a Token
    • Search
    • Support
    • Leanpub FAQ
    • Leanpub Author FAQ
    • Search our Help Center
    • How to Contact Us
    • FRONTMATTER PODCAST
    • Featured Episode
    • Episode List
    • MEMBERSHIPS
    • Reader Memberships
    • Department Reader Memberships
    • Author Memberships
    • Your Membership
    • COMPANY
    • About
    • About Leanpub
    • Blog
    • Contact
    • Press
    • Essays
    • AI Services
    • Imagine a world...
    • Manifesto
    • More
    • Partner Program
    • Causes
    • Accessibility
    • AUTHORS
    • Write and Publish on Leanpub
    • Create a Book
    • Create a Bundle
    • Create a Course
    • Create a Track
    • Testimonials
    • Why Leanpub
    • Services
    • AccessibilityPro (NEW!)
    • Author Quickstart (NEW!)
    • CourseAI
    • TranslateAI
    • GlobalAuthor
    • IndexAI
    • Launch Quickstart (NEW!)
    • Marketing Packages
    • PublishWord
    • Publish on Amazon
    • Author Newsletter
    • The Leanpub Author Update
    • Author Support
    • Author Help Center
    • Leanpub Authors Forum
    • The Leanpub Manual
    • Supported Languages
    • The LFM Manual
    • Markua Manual
    • API Docs
    • Organizations
    • Learn More
    • Sign Up
    • LEGAL
    • Terms of Service
    • Copyright Policy
    • Privacy Policy
    • Refund Policy

*   *   *

Leanpub is copyright © 2010-2025 Ruboss Technology Corp.
All rights reserved.

This site is protected by reCAPTCHA
and the Google  Privacy Policy and  Terms of Service apply.

Leanpub requires cookies in order to provide you the best experience. Dismiss