What you will learn in Code Like a Pro in Rust
Chapter by chapter
Concepts explained in this book
- RustRust is a systems programming language designed to provide memory safety and concurrency safety without garbage collection.
- testA test case is a specific input and execution scenario used to check software behavior or reproduce a failure.
- futureFuture is a Rust trait representing a computation that may complete later and eventually produce an output or remain pending.
- vectorA vector is an ordered, indexed sequence of elements, often numerical, represented as a mathematical quantity or a computational collection.
- cargo.tomlCargo.toml is a project manifest and configuration file that specifies metadata and dependencies for a Cargo project.
- slicingA Rust slice is a dynamically sized view of a contiguous region of values of one type, represented with a pointer and a length.
- crateA crate is a Rust package containing source code and metadata that can be compiled and distributed as a library or application.
- async/awaitAsync/await is syntax for defining and suspending asynchronous computations until awaited operations make progress.
- CargoCargo is Rust's official build system and package manager.
- TokioThe Tokio runtime is the execution component of Tokio that schedules and runs asynchronous Rust tasks.
- ArcArc is a Rust thread-safe reference-counted smart pointer for shared ownership of a value across threads.
- memory allocatorThe Allocator trait is a Rust trait that defines operations and behavior for types representing memory allocators.
- memory allocationMemory allocation is the process of reserving memory regions for data during program execution.
- allocator APIThe allocator API is a Rust API for implementing and selecting custom memory allocators, including unstable interfaces available on the nightly release channel.
- integration testAn integration test is a software test that compiles and executes code exercising a component through interfaces similar to those used by other components or external clients.
- custom allocatorA custom allocator is a programmer- or library-supplied memory allocation implementation that replaces or supplements a language or platform default allocator.
- asynchronous programmingAsynchronous programming structures computation so operations can progress independently without requiring the initiating flow to wait synchronously.
- memory management modelMemory management is the allocation, use, tracking, and release of computer memory during program execution.
- concurrencyConcurrency is the ability for multiple computations to make progress during overlapping periods, whether or not they execute simultaneously.
- parallelismParallelization is the execution of independent computational work concurrently across multiple threads or processing units.
- RcRc is Rust's single-threaded reference-counted smart-pointer type for shared ownership of a value.
- stringA string is a programming-language value representing an ordered sequence of characters or character units as text.
- tupleA tuple is a fixed-size heterogeneous sequence whose element types are specified positionally.
- arrayAn array is a sequence data structure whose elements share a type and can be iterated over and sliced.
- structA compound type is a type formed by combining or grouping multiple values or component types.
- public visibilityVisibility is a Rust access-control property that determines which modules and crates can access a declaration or struct field.
- borrow checkerA borrow checker is a compiler component that enforces rules governing references and ownership to prevent invalid memory access.
- blockingA blocking operation is an operation that prevents an asynchronous runtime from switching tasks for a significant period.
- cargo-fuzzcargo-fuzz is a Cargo subcommand and tool that integrates Rust projects with LLVM's libFuzzer for fuzz testing.
- MapA map is an associative data structure that stores key-value pairs and supports retrieving values by key.
- integer wraparoundInteger wraparound is arithmetic behavior in which an out-of-range fixed-width integer result cycles or is reduced modulo the type’s representable range.
- Axumaxum is a Rust web framework for building HTTP server applications and routing requests to handlers.
- SQLxSQLx is a Rust asynchronous SQL toolkit for communicating with relational databases and mapping query results to Rust types.
- fuzzingFuzz testing is a software-testing technique that exercises programs with automatically generated or mutated inputs to reveal unexpected behavior, including failures caused by invalid data.
- From traitFrom is a Rust standard-library trait for infallible conversion from one type into another type.
- copyClone is a standard Rust trait that defines how a value can produce a duplicate of itself.
- trait objectA trait object is a dynamically dispatched value representing some concrete type that implements a specified trait.
- question mark operatorThe question mark operator is Rust syntax that propagates an error from a Result or Option expression and otherwise produces its successful value.
- copy_from_slicecopy_from_slice is a Rust slice method that copies the elements of one slice into another slice of matching length.
- atomic typeA type is a compile-time classification that determines the values a program element can represent and the operations permitted on them.
- reference-counted pointerA reference-counted pointer is a pointer-like value whose referenced allocation is reclaimed when its tracked reference count reaches zero.
- reference countingReference counting is a memory-management technique that tracks the number of references to an object and reclaims it when that count reaches zero.
- conditional compilationA cfg attribute is a Rust compiler attribute that conditionally includes or excludes the attached source item according to configuration predicates.
- BoxBox is a Rust smart-pointer type that provides unique ownership of a value allocated on the heap.
- cellCell is a Rust standard-library type that provides interior mutability by replacing or retrieving values without exposing references to its contents.
- interior mutabilityInterior mutability is a programming pattern in which a value permits mutation through a shared or otherwise nonmutable handle while enforcing its safety rules at runtime or through synchronization.
- tokio::task::spawntokio::task::spawn is a Tokio function that schedules an asynchronous task on the runtime and returns a join handle.
- rust-analyzerrust-analyzer is a Rust language server providing IDE features such as analysis, navigation, and completion.
- libtestlibtest is Rust's built-in test harness library for discovering, executing, and reporting test results.
- compilerrustc is the official Rust compiler that translates Rust source code into executable or library artifacts and reports compile-time errors.
- refcellRefCell is a Rust standard-library type that provides runtime-checked borrowing and interior mutability for single-threaded code.
- zero-cost abstractionA zero-cost abstraction is a high-level programming construct whose compiled implementation has no runtime overhead beyond an equivalent low-level implementation.
- lock fileCargo.lock is Cargo’s lock file that records exact package dependency versions and integrity checksums.
- libFuzzerlibFuzzer is an LLVM-integrated in-process fuzzing engine and programming interface for testing code with generated inputs.
- SQLiteSQLite is an embedded relational database engine that stores database state in a file and operates within the application process.
- proptestproptest is a Rust property-testing crate that generates test cases from input strategies and shrinks failures to minimal examples.
- databaseA database is an organized system for persistently storing, retrieving, and modifying structured data.
- attributeA struct field is an element of a struct value with a declared type and, in regular structs, a name.
- cargo clippyrust-clippy is a Rust linter that detects common mistakes and recommends idiomatic improvements.
- stateGlobal state is data accessible across an application's execution context rather than owned by a single local scope.
- lazy_staticlazy_static is a Rust crate and macro that provides lazily initialized static values, including values initialized at runtime.
- parallel test executionParallel test execution runs multiple tests concurrently, typically on separate threads, to reduce total testing time.
- SendSend is a Rust marker trait indicating that a value can be transferred safely between threads.
- SyncSync is a Rust marker trait indicating that references to a value can be shared safely between threads.
- thread safetyThread safety is the property that concurrent access to a value or operation preserves its correctness without data races or invalid state transitions.
- referenceAn immutable reference is a read-only reference through which the referenced value cannot be modified.
- IntoInto is a Rust standard-library trait for infallible conversion of a value into a target type.
- mutable referenceA mutable reference is a reference through which the referenced value may be modified.
- enumAn enum is a Rust type that represents a value selected from a defined set of variants, which may carry associated data.
- I/OI/O is the exchange of data between a program and an external source or destination such as a file, device, or network.
- instrumentationtracing is a Rust library for instrumenting programs and emitting structured diagnostic telemetry.
- foreign function interfaceA foreign function interface is a mechanism that allows code in one programming language to call functions or use data types defined in another language.
- derive macroTrait derivation is Rust compiler support for automatically generating implementations of eligible traits for a type.
- crates.iocrates.io is the public package registry for Rust libraries and applications.
- determinismA deterministic computation produces the same result for the same inputs and relevant execution conditions.
- runtime logic errorA logic error is a defect in a program's intended computation that can produce incorrect results even when the program compiles and runs.
- primitive data typeA primitive type is a built-in Rust type representing a basic kind of value rather than a composition of other types.
- singly linked listA singly linked list is a linked sequence of nodes in which each node contains a link to at most one successor.
- optionAn option type is a type that explicitly represents either a value of a specified type or the absence of a value.
- property-based testingProperty-based testing is a software-testing technique that generates many inputs to check whether general properties hold.
- test harnessA test harness is infrastructure that controls test execution and collects or reports test results.
- split_atsplit_at is a Rust slice operation that divides a slice at an index into two nonoverlapping slices.
- schedulerA scheduler is a runtime component that determines when asynchronous tasks execute and switches between them.
- yield pointA yield point is a point in code that passes control back to an asynchronous task scheduler.
- moduleA module is a distinct, bounded software unit that groups related code or functionality and provides an organizational or interaction boundary within a larger system.
- test automation frameworkA testing framework is a software framework that provides reusable structure and support for defining, executing, and reporting tests.
- spawn_blockingtokio::task::spawn_blocking is a Tokio function that runs a blocking operation on a thread dedicated to blocking work.
- sccachesccache is a compiler cache that stores and reuses compilation results.
- feature flagA feature flag is a Cargo configuration option that enables or disables optional functionality, dependencies, or code.
- result typeResult is a Rust enum representing either successful computation with a value or failure with an error.
- dependency managementPackage and dependency management is the practice of declaring, resolving, retrieving, and maintaining software packages and their dependencies.
- C standard librarylibc is a Rust crate providing bindings and platform-specific definitions for the C standard library and C-compatible types.
- migrationA database migration is a versioned change that transforms a database schema or stored data from one state to another.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
