Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Learn Rust with babar

This optional track is for readers who want to learn Rust by reading real babar code and docs examples instead of detouring through toy applications. The opening sequence is aimed at readers who know how to program already and now need a trustworthy way to read Rust in context.

Opening guided sequence

These first five chapters are meant to be read in order:

  1. Read a babar program
  2. Syntax and control flow in context
  3. Types, structs, and Result
  4. Ownership and borrowing around queries
  5. Async/await and the driver task mental model

Together they answer the first questions most new Rust readers hit when they open babar for the first time:

  • What parts of this file are data shapes versus I/O?
  • How do the statement types describe the database boundary?
  • Why do &, clone(), Option<T>, .await, and ? appear so often?
  • What async mental model is enough to keep reading without studying runtime internals yet?

Follow-on chapters

The remaining chapters deepen that foundation without turning this docs site into a general Rust textbook:

  1. Error handling and service boundaries
  2. Traits, generics, and codecs
  3. Structs, impl, and Rust-flavored OOP
  4. Iterators, closures, and functional style

How the guided pages are framed

Each chapter in this section follows the same pattern:

  1. babar anchor — start from a real babar example, docs page, or code path.
  2. Rust-first explanation — explain the Rust concept directly in the context of that anchor.
  3. Python comparison (optional) — include a clearly labeled comparison only when it closes a real gap for Python-fluent readers.
  4. Checkpoint / reflection — end with a small self-check so you can tell whether the Rust idea is starting to stick.

Start here, then branch outward

If you want the shortest path through the opening sequence, read the five chapters above and keep these source anchors open in a second tab:

After that, jump outward only when you need more depth: