What you will learn in Rust in Action: Systems programming concepts and techniques
Systems programming concepts and techniques
Chapter by chapter
Chapter 1: Introducing Rust
The chapter introduction welcomes readers and previews the book’s practical Rust projects and systems-programming topics.
What you learn in chapter 1 →Chapter 2: Language foundations
Introduces the chapter’s plan for learning Rust fundamentals through examples and a grep-lite project.
What you learn in chapter 2 →Chapter 3: Compound data types
The introduction explains why Rust’s structs and enums are useful for composing simpler values into compound data types.
What you learn in chapter 3 →Chapter 4: Lifetimes, ownership, and borrowing
The introduction explains why Rust’s borrow checker matters and gives basic meanings for ownership, lifetimes, and borrowing.
What you learn in chapter 4 →Chapter 5: Data in depth
The chapter introduces its focus on data representation and computation and previews the topics and projects ahead.
What you learn in chapter 5 →Chapter 6: Memory
Introduces memory as a shared resource and explains that the OS gives programs a simplified view of its availability and location.
What you learn in chapter 6 →Chapter 7: Files and storage
The introduction explains why permanent data storage is more involved than keeping data in RAM, then previews the chapter’s projects.
What you learn in chapter 7 →Chapter 8: Networking
Introduces the chapter’s progression from high-level HTTP requests to raw TCP packets and previews related Rust topics.
What you learn in chapter 8 →Chapter 9: Time and timekeeping
The chapter introduction explains why computer time is tricky for applications, measurements, and synchronization across machines.
What you learn in chapter 9 →Chapter 10: Processes, threads, and containers
The introduction distinguishes concurrency from parallelism and explains how a single CPU core can support concurrent tasks.
What you learn in chapter 10 →Chapter 11: Kernel
The chapter introduces a project to build a minimal operating system in Rust and frames it as relevant to programming without an OS.
What you learn in chapter 11 →Chapter 12: Signals, interrupts, and exceptions
The chapter introduces how outside events interrupt program execution and how signals let running programs communicate.
What you learn in chapter 12 →Concepts explained in this book
- RustRust is a compiled systems programming language designed for memory safety, concurrency, and performance without relying on garbage collection.
- referenceA reference is a non-owning value that provides access to another value without transferring its ownership.
- address spaceAn address space is the set of memory addresses available for identifying stored data and instructions in an execution environment.
- slicingA slice is a dynamically sized, fixed-length view of contiguous elements that does not own or resize the underlying storage.
- exceptionAn exception is a synchronous or otherwise special execution event that interrupts normal program flow because of an error or exceptional condition.
- trait objectA trait object is a dynamically sized Rust value representing a value of a type that implements a trait and accessed through a pointer for runtime polymorphism.
- closureA closure is an anonymous callable value that can contain an expression body and capture values from its surrounding scope.
- memory locationA memory address is a numeric location identifying where data or instructions reside in computer memory.
- traitThe trait keyword is Rust's reserved keyword for declaring a trait.
- ownershipAn owner is the binding or program entity responsible for cleaning up a value when its lifetime ends.
- execution context stackA call stack is the runtime structure that records active function calls, their local data, and the points to which control returns.
- type safetyType safety is the enforcement of rules that prevent values of incompatible types from being used together in invalid operations.
- floating-point arithmeticA floating-point type represents real-number values using a finite-precision binary format with sign, exponent, and significand components.
- opcodeAn opcode is a symbolic code that identifies an instruction in a programming language or instruction set.
- From traitFrom is a Rust standard-library trait for infallibly converting a value of one type into another type.
- CargoCargo is Rust's package manager and build system for creating, compiling, running, documenting, and managing Rust projects.
- threadA thread of execution is a sequence of CPU instructions intended to execute serially within a running program.
- enumAn enum is a type whose value is one of a finite set of named variants, optionally carrying associated data.
- stringString is Rust's owned, growable UTF-8 string type whose character data is stored in heap-allocated memory.
- u16u16 is Rust's unsigned 16-bit integer type, representing values from 0 through 65,535.
- result typeResult is Rust's standard result type that contains either a successful value or an error value.
- FP32A single-precision floating-point type is a floating-point type represented with the precision associated with Rust's f32 type.
- concurrencyConcurrency is the execution of multiple computational activities during overlapping time periods, potentially on the same or different processors.
- clockA system clock is the operating system's maintained representation of the current time, from which applications obtain time values.
- unsafe blockAn unsafe block is a Rust code region in which operations requiring explicit programmer responsibility for safety are permitted.
- operating system kernelA kernel is the privileged core of an operating system that manages hardware resources and provides fundamental services for software execution.
- interruptA hardware interrupt is an asynchronous request from a hardware device that causes a processor to suspend or redirect its current execution to handle an event.
- memory allocationMemory allocation is the process of reserving memory for data or program execution.
- borrowingBorrowing is Rust's mechanism for temporarily accessing a value through a reference without taking ownership of it.
- vectorA vector is a dynamically resizable, ordered collection of elements.
- boot imagebootimage is a Rust crate that automates building bootable images containing an operating-system kernel and its bootloader.
- Unix epochAn epoch is the defined reference point from which elapsed time is measured.
- heapThe heap is a region of memory used for dynamically allocated data whose lifetime and size are not determined solely by the call stack.
- compiler intrinsicA compiler intrinsic is a compiler-recognized low-level operation exposed through a programming-language interface rather than an ordinary library implementation.
- nanNot a number is a floating-point special value representing an undefined or unrepresentable numeric result.
- stack pointerA stack pointer is a CPU-maintained pointer to the current location or top of a call stack.
- numerical overflowInteger overflow occurs when an integer computation exceeds the finite range representable by its fixed-width representation.
- NTPNTP is a network protocol for synchronizing computer clocks using timestamp exchanges between clients and time servers.
- lifetimeA lifetime is the statically determined span during which a Rust value or reference remains valid.
- cargo runcargo run is a Cargo subcommand that builds a Rust project and executes its resulting binary.
- timestampA timestamp is a representation of a point in time, commonly expressed as an elapsed value or formatted date and time.
- workflowA process is a running program instance with its own execution context and operating-system-managed resources, including an address space.
- signalA signal is an asynchronous operating-system notification delivered to a process to report an event or request handling.
- literalA literal form is Rust syntax that directly initializes or denotes a value according to the type's literal representation.
- DNS resolutionDomain name resolution is the process of retrieving network resource records for a domain name from the Domain Name System.
- no_std programno_std is a Rust crate attribute that prevents automatic linkage of the Rust standard library.
- virtual addressA virtual address is an address in a process's virtual address space that is translated by the operating system and hardware to physical memory.
- BoxBox is Rust's owning smart pointer type for storing a value on the heap while keeping a pointer to it in the containing value.
- frame bufferA VGA frame buffer is a memory region whose contents represent text or pixel data displayed by VGA hardware.
- borrow checkerThe borrow checker is the Rust compiler component that verifies ownership, borrowing, and lifetime rules to prevent invalid memory access.
- data conversionA type cast is an explicit conversion of a value from one data type to another.
- exponentAn exponent is the component of a floating-point representation that determines the scale or power of two applied to its significand.
- unit typeThe unit type is a type with exactly one value, written () in Rust, and represents the absence of a meaningful value.
- unsafe RustThe unsafe keyword marks Rust code that may perform operations requiring guarantees the compiler cannot verify automatically.
- time zoneA time zone is a regional convention associating local civil times with offsets or rules relative to a reference time scale.
- smart pointerA smart pointer is a pointer-like data structure that provides additional capabilities such as ownership management, reference counting, or synchronization.
- MMUA memory management unit is processor hardware that translates virtual addresses into physical addresses and enforces memory-access attributes.
- memory pageA page is a fixed-size block of virtual memory that is mapped as a unit to physical memory or secondary storage.
- translation lookaside bufferA translation lookaside buffer is a processor cache of recently used virtual-to-physical address translations.
- MapAn associative array is an abstract data structure that maps keys to values without requiring integer indices.
- actionkvActionKV is the book's key-value storage implementation that exposes operations for retrieving, deleting, inserting, and updating stored pairs.
- interior mutabilityInterior mutability is a design property allowing a value's internal state to change through an otherwise immutable interface.
- compilerA compiler is a program that translates source code into executable or lower-level code while checking it against the language's rules.
- dynamically sized typeA dynamically sized type is a type whose size is not known at compile time and whose values require runtime size information.
- let keywordA let binding introduces a local Rust variable binding whose associated value may have internally mutable state even when the binding itself is immutable.
- hardware registerA CPU register is a small, processor-local storage location holding an operand, address, instruction state, or status value.
- compilation targetA compilation target is the specified hardware and software environment for which a compiler generates code.
- function pointer typeA function pointer is a value that identifies a function and can be passed or stored so that the function can be invoked indirectly.
- mantissaA significand, also historically called a mantissa, is the significant-value component of a scientific-notation or floating-point representation.
- integerAn integer is a whole-number value without a fractional component.
- signal handlerA signal handler is a function or disposition associated with a signal that determines how a process responds when the signal is delivered.
- BTreeMapA BTreeMap is a Rust ordered map that stores key-value pairs in a B-tree and supports ordered traversal.
- conditional compilationA cfg attribute is a Rust attribute that conditionally includes an item based on compile-time configuration predicates.
- parallelismParallelism is the simultaneous execution of computational activities on multiple physical processing cores or other execution units.
- IP addressAn IP address is a numerical network-layer identifier assigned to a host or interface in an Internet Protocol network.
- extern "C"extern "C" is Rust syntax that specifies C-compatible calling and linkage conventions for functions or foreign-function interfaces.
- fixed-point representationA fixed-point number format represents fractional values with a fixed position for the decimal point and a predetermined allocation of bits.
- TryFromTryFrom is a Rust standard-library trait for conversions that may fail and therefore return a result indicating success or error.
- memoryRAM is volatile computer memory that stores data and instructions available to a running processor.
- TCPTCP (Transmission Control Protocol) is a transport-layer network protocol that provides reliable, ordered, connection-oriented delivery of data.
- no_mangleno_mangle is a Rust attribute that suppresses compiler name mangling for an item’s externally visible symbol.
- unwrapThe unwrap method extracts a successful value from a Result or Option and panics when it contains an error or no value.
- attributeAn attribute is Rust syntax that attaches metadata to a program item and can control compiler behavior such as conditional inclusion.
- setjmp/longjmplongjmp is a non-local control-flow function or compiler intrinsic that restores an execution context previously saved by setjmp.
- impl blockThe impl keyword is Rust's reserved keyword for associating implementations, including trait implementations, with types.
- scopeA scope is a region of program text that determines where names and declarations are visible.
- moveMove semantics define how transferring ownership of a value invalidates or relocates its previous binding instead of implicitly copying the value.
- static mutstatic mut declares a mutable Rust static variable with a program-wide lifetime and mutable access requiring unsafe handling.
- backpressureBack pressure is a flow-control mechanism that slows or blocks producers when a consumer or buffer cannot keep up.
- bounded queueA bounded queue is a queue with a fixed capacity that can make producers wait when no space is available.
- channelA channel is a communication abstraction with sending and receiving endpoints that transfers typed values between concurrent activities.
- crossbeamcrossbeam is a Rust library providing concurrency primitives and utilities, including message-passing channels.
- clientA client is a network participant that initiates requests or sends messages to a service or peer.
- select macroThe select! macro is a Crossbeam macro that waits for one of multiple channel operations to become ready.
- work queue patternA task queue is a pattern in which tasks are submitted independently of their processing and are later retrieved by worker threads.
- copy semanticsCopy semantics are value-transfer rules in which assigning or passing a value duplicates it while leaving the original usable.
- Copy traitCopy is a Rust marker trait whose implementation permits values of a type to be implicitly duplicated rather than moved.
- bit patternA bit pattern is an arrangement of binary digits whose interpretation depends on the data type assigned to it.
- cargo.tomlCargo.toml is a Rust package manifest that declares project metadata and dependencies.
- as operatorThe as operator is Rust syntax for explicitly converting a value to another type using a permitted cast.
- epsFloating-point epsilon is a small tolerance used to assess whether a computed value is sufficiently close to an expected mathematical result.
- TryIntoTryInto is a Rust standard-library trait for fallible conversion of a value into a specified target type.
- structA struct is a Rust data structure that defines a composite value with named fields and their types.
- system timeSystem time is the time value maintained by an operating system for representing the current date and time.
- UDPUDP is a connectionless transport protocol that sends independent datagrams without guaranteeing delivery, ordering, or duplication control.
- segmentation faultA segmentation fault is an execution failure caused by attempting to access a memory region without permission or outside its valid bounds.
- pipelineA pipeline is a sequence of processing stages in which each stage transforms data for the next stage.
- CPUA CPU is the computer hardware component that executes instructions and performs arithmetic and logical operations.
- stack frameA stack frame is a per-function-call memory record containing call state, arguments, local variables, and return information.
- memory allocatorAn allocator is a program component that manages dynamic memory requests and may optimize interaction with the operating system.
- expression-based languageAn expression-based language treats expressions as constructs that produce values and can generally be composed wherever values are expected.
- macroA macro is a code-generation construct that expands source syntax into program code rather than directly returning a runtime value.
- println! macroprintln! is Rust's standard macro for printing formatted output followed by a newline.
- method callA method call is an expression that invokes a method associated with a value or type.
- loopA for loop repeatedly executes a block while iterating over the elements of a sequence or iterator.
- isolationIsolation is the separation of program execution or resources so that activity in one environment is restricted from directly affecting another.
- cargo addcargo add is a Cargo subcommand that adds a dependency declaration to a Rust project's manifest.
- bit operationA bitwise operation transforms or combines integer values by operating on their individual binary bits.
- global variableA global variable is a variable whose storage and scope make it accessible across multiple parts of a program.
- read traitA Read trait is a trait that specifies shared read-related behavior for implementing types.
- DisplayThe Display trait is Rust's standard formatting trait for producing a user-facing textual representation of a value.
- bytesA byte is a unit of digital information consisting of eight binary bits.
- checksumA checksum is a value computed from data and stored or transmitted with it so later recomputation can detect changes or corruption.
- machine instructionAn instruction is an encoded command that a processor can fetch and execute, including commands expressed in assembly language.
- swappingSwapping is the movement of inactive memory contents between RAM and secondary storage to manage limited physical memory.
- 8-bit signed integeri8 is Rust's signed 8-bit integer type.
- Q7Q7 is a one-byte signed fixed-point representation with seven value bits and one sign bit for compact fractional values.
- moduleA module is a Rust language construct that groups related declarations and organizes a crate's source code.
- q-formatQ format is a fixed-point numeric representation convention that allocates bits between a signed integer encoding and a fractional scale.
- testUnit testing is the practice of testing individual program units in isolation against expected behavior.
- tuple structA tuple struct is a Rust struct whose fields are unnamed and accessed by position.
- name-value pairA key-value pair collection is an abstract data structure that associates each key with a corresponding value.
- AsRefAsRef is a Rust standard-library trait for cheaply converting a value into a shared reference to a specified target type.
- cache lineA cache line is a small fixed-size block of data transferred between RAM and a processor cache as a unit.
- memory pagingPaging is a memory-management technique that divides virtual memory into fixed-size pages and moves or maps those pages independently.
- hexadecimal numberHexadecimal notation is a base-16 positional numeral system that represents values using sixteen distinct digits.
- Errorstd::error::Error is Rust's standard trait for representing errors that can provide descriptions and optional source errors.
- safetySoftware safety is the property of software behavior being constrained to avoid invalid, harmful, or erroneous outcomes.
- panicA panic is Rust's runtime failure behavior for terminating execution after an unrecoverable program error.
- real-time clockA real-time clock is a hardware clock that maintains calendar time independently of the main processor and usually continues running while the system is powered off.
- pointer-sized integerisize is Rust's signed integer type whose width matches the target platform's pointer size.
- HTTPHTTP (Hypertext Transfer Protocol) is an application-layer protocol for exchanging requests and responses between clients and servers.
- endiannessEndianness is the convention governing the order in which the bytes of a multibyte value are laid out in memory.
- dns messageA DNS message is a structured network packet used to carry a DNS query or response.
- domain nameA domain name is a hierarchical, human-readable identifier for an Internet host or other DNS resource.
- domain name systemThe Domain Name System is a distributed naming system that maps domain names to network resource records such as IP addresses.
- trust-dns crateThe trust-dns crate is a Rust library for constructing, sending, and interpreting DNS protocol messages.
- CPU emulatorA CPU emulator is software that reproduces the instruction execution behavior of a processor.
- type hintsA type annotation is source-code syntax that explicitly specifies the type of an expression, variable, or parameter.
- 64-bit floating-point numberA double-precision floating-point type is a floating-point type represented with the precision associated with Rust's f64 type.
- dereferencingDereferencing is the operation of accessing the value designated by a pointer or reference.
- encodingAn encoding is a representation that maps information such as instructions or data to a defined sequence of symbols or bits.
- arrayAn array is a contiguous, indexable sequence of a fixed number of elements whose size is part of its type.
- asynchronous programmingAsynchronous programming is a programming model in which externally occurring events influence the order of control-flow execution.
- coroutineA coroutine is a task-switching concurrency mechanism in which the program, rather than the operating system, controls switching within a thread.
- non-blocking I/ONon-blocking I/O allows a thread to continue executing while it waits for input or output data.
- taskA task is an abstract unit of work whose meaning may range from a thread to a function call or a running program.
- parity bitA parity bit is an added binary bit indicating whether the number of 1 bits in associated data is even or odd.
- page faultA page fault is a memory-access condition in which the requested address is unavailable and the required data must be fetched into memory.
- static methodA static method is a function associated with a type rather than with an instance of that type.
- mac addressA MAC address is a link-layer identifier assigned to a network interface for communication on a local physical or wireless link.
- num crateThe num crate is a Rust library providing numeric types and operations beyond Rust's built-in numeric types.
- meanElapsed time is the duration between two temporal events or points.
- assignmentAssignment is an operation or expression that binds or updates a variable or other assignable place with a value, potentially transferring ownership when the value is non-copyable.
- busy-waiting loopA spin loop repeatedly checks a condition while actively consuming CPU time instead of blocking execution.
- sleepSleep is an operation that suspends the current thread for a specified duration or until an external wake-up event.
- time_ttime_t is a libc type alias representing elapsed whole seconds since the Unix epoch.
- key-value storeA key-value store is a data-storage system that associates keys with values and supports storing and retrieving those values.
- QEMUQEMU is an open-source machine emulator and virtualizer that runs operating systems and programs for multiple computer architectures.
- segmentA segment is a subdivision of a process memory region with associated placement or access boundaries.
- call opcodeThe CALL opcode transfers CPU execution to a function address while saving the current address for later return.
- return opcodeThe RETURN opcode restores CPU execution to the address saved by a preceding function call.
- aliasingAliasing is the condition in which multiple references or access paths designate the same memory location at the same time.
- const qualifierA const declaration defines a compile-time constant whose value cannot be changed.
- errnoerrno is a C and POSIX process-global error indicator that system calls may set to identify a failure condition.
- dependencyA dependency is an external software package required by a project.
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.
