Profile PictureJoel Parker Henderson

Rust Guideposts

$0+

Rust Guideposts are topic summaries that help people learn about the Rust programming language, ecosystem, concepts, crates, and more. You can try any topic, in any order, at any time, akin to a frequently asked questions resource.

See https://github.com/sixarm/rust-guideposts

Rust Guideposts are maintained by Joel Parker Henderson at SixArm Software, with artificial intelligence prompt completions by ChatGPT. We welcome constructive advice, new topic pages, pull requests, and more.

See https://github.com/joelparkerhenderson

Rust Guideposts are available as an ebook PDF with 200+ pages of topics. The ebook PDF version is 1.0.0. The book is pay-what-you-want, because we want it to help as many developers as possible.

Table of Contents

Introduction

* What are Rust Guideposts?
* What are Rust Guideposts' projects?
* Who is this for?
* How can I contribute?

Welcome to Rust

* What is a Rust "Hello, world!" program?
* What is a Rust "FizzBuzz" program?
* What is a Rust "Fibonacci" program?

Learning

* What makes Rust good?
* What is the Rust ecosystem?
* Who might benefit from learning Rust?
* What are good ways to learn Rust?
* What are good projects to learn Rust?

Caveats

* What are the hardest parts of Rust?
* Rust stable versus Rust nightly
* What is Rust missing?
* What are some non-goals of Rust?
* Why do companies not use Rust?

What makes Rust special?

* The borrow checker
* Channels for thread communication
* Concurrency and parallelism
* Error messages
* Foreign Function Interface (FFI)
* Futures for asynchronous operations
* Monomorphisation
* Resource Acquisition Is Initialization
* Unsafe code
* WebAssembly (WASM)
* Zero-cost abstractions

Type guideposts

* Scalar types
* Compound types
* Sum types and product types
* str type versus String type
* String types for UTF-8, C, OS, and paths
* Box type for a smart pointer
* Cow type for clone-on-write
* RefCell type for dynamic borrowing
* Rc type for single-thread sharing
* Arc type for multi-thread sharing
* Pin type for memory location

Trait guideposts

* Copy trait and Clone trait for duplication
* Debug trait for debugging and printing
* Display trait for formatting
* dyn trait for dynamic dispatch
* Eq, PartialEq, Ord, PartialOrd traits
* From and Into traits for conversions
* Send trait for sending among threads
* Sync trait for syncing among threads
* Send & Sync - implementations
* Sealed traits

Keyword guideposts

* enum keyword for enumerations
* struct keyword for custom data types
* union keyword for multi-purpose memory
* match keyword for control flow
* mod keyword for module namespaces
* mod keyword for nested hierarchies
* async/await keywords for futures
* trait keyword for polymorphism

Macro guideposts

* println! macro for printing output
* assert! macro and friends for testing
* regex! macro for lazy static optimization
* catch_unwind! macro to handle panic
* macro_rules! for declarative macros

Syntax

* Annotations for compiler directives
* Destructuring into components
* Iterators for traversing collections
* Closures for anonymous functions
* Macros for metaprogramming
* Panic and how to handle it with a hook
* Pass by value or reference
* Range syntax for a sequence of values
* Tuples for ordered collections

Memory

* Memory lifetimes
* Implicit lifetimes
* Explicit lifetimes
* Memory on the stack or the heap
* Memory ownership and borrowing
* Mutability and immutability
* No garbage collection
* Borrow splitting

Testing

* Test framework
* Test assertions
* Unit testing
* Integration testing
* Documentation testing
* Documentation testing annotations
* Source-based code coverage
* Test-driven development (TDD)

Examples

* Access a database with rusqlite
* Aspect-oriented programming (AOP)
* Benchmark times with Bencher
* Liskov substitution principle (LSP)
* List directories recursively with walkdir
* Make HTTP request with reqwest
* Parse JSON data with Serde
* Read a spreadsheet with CSV
* Run a terminal program with cursive
* Search a text file with regex

Tooling we use often

* rustup command-line tool
* Cargo package manager and crates
* cargo-install-favorites
* Blessed recommendations
* Clippy linting
* Helix text editor
* Rustfmt for code formatting
* Rust mdBook for documentation
* Cross-compiling for multiple platforms
* Rhai script

Tooling concepts

* Abstract syntax tree (AST)
* Tree-sitter parsing library
* Language Server Protocol (LSP)
* Static analysis for error detection
* Debugger for diagnostics

Design patterns

* Design patterns: introduction
* Design patterns: adapter
* Design patterns: builder
* Design patterns: observer
* Design patterns: singleton

Crates we like for many of our programs

* Assertables crate for assert macro tests
* log crate for logging messages
* itertools crate for iterator extras
* once_cell crate for lazy global variables
* syn crate for syntax analysis
* regex crate for regular expressions
* Serde crate for serialize/deserialize
* Strum crate for enums
* rand crate for random numbers

Crates we like for command line interfaces

* CLAP crate for commands
* Textwrap crate for text wrapping
* Cursive crate for text user interfaces
* TUI crate for text user interfaces
* walkdir crate for traversing directories

Crates we like for development

* cargo-cache crate for caching builds
* cargo-crev for community-driven trust
* cargo-dist crate for distribution archives
* cargo-release crate for publishing
* cargo-make crate for task runners
* Criterion crate for benchmarks

Crates we like for concurrency and parallelism

* Crossbeam crate for concurrency
* epoll crate for event polling
* Flume crate for channels
* parking_lot crate for synchronization
* Rayon crate for parallelism

Crates we like for data

* arrow-csv crate for loading CSV to Arrow
* CSV crate for comma-separated values
* Diesel crate for ORM
* Polars crate for data analysis
* Rusqlite crate for SQLite databases
* sqlx crate for SQL databases

Crates we like for web applications

* axum crate for web services
* hyper crate for HTTP clients/servers
* prost crate for protocol buffers
* reqwest crate for HTTP requests
* Sycamore crate for reactive front-end
* Tokio crate for async/concurrency
* tonic crate for gRPC
* yew crate for client-side web app

Crates we like for graphics & games

* gtk4 crate for GTK GUIs
* egui crate for pure Rust GUIs
* Bevy crate for game programming
* macroquad crate for simple games

Backmatter

* About the author
* About ChatGPT
* About this ebook PDF
* About related projects


$
Add to cart

You get the Rust Guideposts ebook PDF with 200+ pages of topics.

Size
577 KB
Length
228 pages
Copy product URL
$0+

Rust Guideposts

Add to cart