𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Code Like a Pro in Rust

✍ Scribed by Brenden Matthews


Tongue
English
Leaves
164
Edition
MEAP
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Get ready to code like a pro in Rust! This hands-on guide dives deep into memory management, asynchronous programming, and Rust design patterns and explores essential productivity techniques like testing, tooling, and project management.

Get ready to code like a pro in Rust! This hands-on guide dives deep into memory management, asynchronous programming, and Rust design patterns and explores essential productivity techniques like testing, tooling, and project management.

Code Like A Pro in Rust is a fast-track guide to building and delivering professional quality software in Rust. You’ll upgrade your basic knowledge of Rust with conventions, best practices, and veteran’s secrets that are normally only learned through years of experience. Skip the fluff and get right to the heart of this powerful modern language, including Rust’s support for asynchronous programming and integrating Rust with codebases written in other languages.

✦ Table of Contents


Code Like a Pro in Rust MEAP V04
Copyright
Welcome
Brief contents
Chapter 1: Feelin' Rusty
1.1 What’s Rust?
1.2 What’s unique about Rust?
1.2.1 Safe
1.2.2 Modern
1.2.3 Pure open source
1.2.4 Rust versus other popular languages
1.3 When should you use Rust?
1.3.1 Rust use cases
1.3.2 Tools you’ll need
1.4 Summary
Chapter 2: Project management with Cargo
2.1 Cargo tour
2.1.1 Basic usage
2.1.2 Creating a new application or library
2.1.3 Building, running, and testing
2.1.4 Switching between toolchains
2.2 Dependency management
2.2.1 Handling the Cargo.lock file
2.3 Feature flags
2.4 Patching dependencies
2.4.1 Indirect dependencies
2.4.2 Best practices
2.5 Publishing crates
2.5.1 CI/CD integration
2.5.2 Best practices
2.6 Linking to C libraries
2.7 Binary distribution
2.7.1 Cross compilation
2.7.2 Building statically linked binaries
2.8 Documenting Rust projects
2.8.1 Code examples in documentation
2.9 Workspaces
2.10 Custom build scripts
2.11 Embedded environments
2.11.1 Memory allocation
2.12 Summary
Chapter 3: Rust tooling
3.1 Overview of Rust tooling
3.2 Using Rust Language Server (RLS) for Rust IDE integration
3.2.1 Installing RLS
3.3 Using rust-analyzer for Rust IDE integration
3.3.1 Magic completions
3.4 Using rustfmt to keep code tidy
3.4.1 Installing rustfmt
3.4.2 Configuring rustfmt
3.5 Using Clippy to improve code quality
3.5.1 Installing Clippy
3.5.2 Clippy’s lints
3.5.3 Configuring Clippy
3.5.4 Automatically applying Clippy’s suggestions
3.5.5 Using Clippy in CI/CD
3.6 Reducing compile times with sccache
3.6.1 Installing sccache
3.6.2 Configuring sccache
3.7 Integration with IDEs, including VS Code
3.8 Using toolchains: stable vs nightly
3.8.1 Nightly-only features
3.8.2 Using nightly on published crates
3.9 Additional tools: cargo-update, cargo-expand, cargo-fuzz, cargo-watch, cargo-tree
3.9.1 Keeping packages update to date cargo-update
3.9.2 Debugging macros with cargo-expand
3.9.3 Testing with cargo-fuzz
3.9.4 Iterating with cargo-watch
3.9.5 Examining dependencies with cargo-tree
3.10 Summary
Chapter 4: Data structures
4.1 Demystifying String, str, &str, and &'static str
4.1.1 String vs str
4.1.2 Using strings effectively
4.1.3 Best practices for working with Rust strings
4.2 Understanding slices and arrays
4.3 Using vectors
4.3.1 Types related to vectors
4.3.2 Diving deeper into Vec
4.3.3 Wrapping vectors
4.3.4 Best practices for vectors
4.4 Using hash maps
4.4.1 Custom hashing functions
4.4.2 Creating hashable types
4.4.3 Best practices for hash maps
4.5 Understanding Rust’s types: primitives, structs, enums, aliases
4.5.1 Using primitive types
4.5.2 Using tuples
4.5.3 Using enums
4.5.4 Using aliases
4.6 Error handling with Result
4.7 Converting types with From/Into
4.7.1 TryFrom and TryInto
4.7.2 Best practices for type conversion using From and Into
4.8 Handling FFI compatibility with Rust’s types
4.9 Summary
Chapter 5: Working with memory
5.1 Memory management: heap and stack
5.2 Understanding ownership: copies, borrowing, references, and moves
5.3 Deep copying
5.4 Avoiding copies
5.5 To box or not to box: smart pointers
5.6 Reference counting
5.7 Clone on write
5.8 Custom allocators
5.8.1 Writing a custom allocator
5.8.2 Creating a custom allocator for protected memory
5.9 Summary
Chapter 6: Unit testing
6.1 How testing is different in Rust
6.2 Review of built-in testing features
6.3 Testing frameworks
6.4 What not to test, or why the compiler knows better than you
6.5 Handling parallel test special cases and global state
6.6 Thinking about refactoring
6.7 Refactoring tools
6.7.1 Reformating
6.7.2 Renaming
6.7.3 Relocating
6.7.4 Rewriting
6.8 Code coverage
6.9 Dealing with a changing ecosystem
6.10 Summary
Chapter 7: Integration testing
7.1 Comparing integration and unit testing
7.2 Integration testing strategies
7.3 Built-in integration testing versus external integration testing
7.4 Integration testing libraries and tooling
7.4.1 Using assert_cmd to test CLI applications
7.4.2 Using proptest with integration tests
7.4.3 Other integration testing tools
7.5 Fuzz testing
7.6 Summary
Notes


πŸ“œ SIMILAR VOLUMES


Code Like a Pro in Rust
✍ Brenden Matthews πŸ“‚ Library πŸ“… 2022 πŸ› Manning Publications 🌐 English

<span>Get ready to code like a pro in Rust! This hands-on guide dives deep into memory management, asynchronous programming, and Rust design patterns and explores essential productivity techniques like testing, tooling, and project management.</span><span><br><br>Get ready to code like a pro in Rust

Code Like a Pro in Rust
✍ Brenden Matthews πŸ“‚ Library πŸ“… 2024 πŸ› Manning 🌐 English

Get ready to code like a pro in Rust with insider techniques used by Rust veterans! Code Like a Pro in Rust dives deep into memory management, asynchronous programming, and the core Rust skills that make you a Rust pro! Plus, you’ll find essential productivity techniques for Rust testing, tooling

Code like a Pro in C#
✍ Jort Rodenburg πŸ“‚ Library πŸ“… 2021 πŸ› Manning Publications 🌐 English

<b>Build on your existing programming skills and upskill to professional-level C# programming.</b> <br><br><i>In Code Like A Pro in C#</i> you will learn: β€’ Unit testing and test-driven development β€’ Refactor a legacy .NET codebase β€’ Principles of clean code β€’ Essential backend architecture s

Code like a Pro in C#
✍ Jort Rodenburg πŸ“‚ Library πŸ“… 2021 πŸ› Manning Publications 🌐 English

<b>Build on your existing programming skills and upskill to professional-level C# programming.</b> <i>In Code Like A Pro in C#</i> you will learn: β€’ Unit testing and test-driven development β€’ Refactor a legacy .NET codebase β€’ Principles of clean code β€’ Essential backend architecture skills β€’

Code like a Pro in C#
✍ Jort Rodenburg πŸ“‚ Library πŸ“… 2021 πŸ› Manning Publications 🌐 English

<b>Build on your existing programming skills and upskill to professional-level C# programming. </b> <b>Summary</b> In <i>Code Like A Pro in C#</i> you will learn: Β Β Β  Unit testing and test-driven development Β Β Β  Refactor a legacy .NET codebase Β Β Β  Principles of clean code Β Β Β  Essential bac