Prelude
Hello and welcome! As we embark on this expedition through the realms of distributed systems with Rust as our trusty guide, I want to set a few things straight.
First off, this project was part of my bachelor degree major project, so don’t expect a too polished or comprehensive treatment of every topic. It was a secondary project I started alongside my main studies. And to set up, while Rust is a fascinating language with a powerful standard library, we won’t be confining ourselves strictly to it. There are brilliant minds in the Rust community who’ve developed libraries that make our lives significantly easier. So, instead of reinventing the wheel, we’ll often be leveraging these existing tools. That said, I promise to dive deep into the concepts behind them whenever it’s enlightening to do so.
This text is a blend of my passion for distributed systems and my journey of learning Rust. I aim to offer a balanced mixture of foundational knowledge and hands-on Rust examples. While it’s tempting to hand-code everything from scratch, sometimes it just makes more sense to use tools that have already been forged, tested, and refined by the community.
In this shared journey, you’ll see the meshing of theory with practical Rust coding. We’ll be pragmatic, focusing on understanding and applying. After all, understanding the ‘why’ often leads to a better ‘how’.
Project Baseline (Rust 2024 + MSRV)
To keep examples reproducible and CI-friendly, this book uses a clear baseline:
edition = "2024"rust-version = "1.85"(MSRV)
Suggested Cargo.toml template for examples:
[package]
name = "multi-rust-examples"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
[profile.release]
lto = true
codegen-units = 1
If you want runnable code immediately, jump to the Examples Project page. It links to the standalone examples/ crate and quick run commands.
Let’s dive in, explore together, and make the most of the tools and knowledge available to us!