Chapter 3: Project structure and configuration
The introduction explains why developers need to understand embedded Rust project structure beyond what a generated template provides.
After this chapter you will be able to
- Limits of project templates. Explain why a generated project template is a useful starting point but not a substitute for understanding how to structure an embedded Rust project manually.
- Embedded project layout differences. Explain how a bare-metal Rust project can look like a familiar Cargo project while adding files for hardware-specific requirements.
- Embedded project manifest. Describe Cargo.toml as the central manifest for package metadata, dependencies, and build profiles, and explain why its settings must suit bare-metal execution.
- Compile-time dependency features. Explain how Cargo feature flags select optional functionality so an embedded build includes what its hardware and application need rather than every available code path.
- Reproducible dependency versions. Explain how Cargo.lock fixes dependency versions across builds and why that matters for embedded binaries.
- Optional cargo-embed configuration. Explain how Embed.toml configures cargo-embed for a project, what kinds of settings it can hold, and why an embedded Rust project does not require it.
- Purpose of build configuration. Explain why an embedded Rust project needs build-system and linker configuration in addition to its basic project structure.
- Memory region definitions and accuracy. Explain what FLASH and RAM definitions in memory.x specify, how they guide linker placement, and why they must match the microcontroller’s data sheet.
- Optional build script role. Explain when build.rs is useful and when it is unnecessary, and describe when Cargo runs it.
- Generated linker script workflow. Trace the section’s example of using build.rs to generate memory.x and make it available to the linker.
- Embedded build configuration. Explain how .cargo/config.toml sets an embedded target and passes linker-script flags, and why keeping these settings in the project simplifies Cargo commands.
- Firmware runner selection. Describe what the runner setting controls and how the section switches from an OpenOCD-based debugging path to probe-rs.
- Purpose of Cargo features. Explain why embedded projects use Cargo features to conditionally include optional components, and describe how this helps with code size and different hardware or debugging configurations.
- Optional dependencies and named features. Explain how optional dependencies and named features are declared in Cargo.toml, using the panic and semihosting dependencies as examples.
- Default and semihosting builds. Distinguish the default panic-halt build from the semihosting build, including the commands that select them and the possibility of conditionally compiled Rust code.
- Target-Specific Dependency Selection. Explain that Cargo can include a dependency only for matching build targets, allowing one codebase to use different support crates for different architectures.
- Dependency feature discovery. Describe where to find a crate’s available features and default features, and where to check the full feature definitions.
- Bare-metal default feature control. Justify disabling a dependency’s default features and enabling only those required for a bare-metal build.
- Bare-metal no_std rationale. Explain why a Rust project for a bare-metal microcontroller is configured to operate without the standard library.
- OS independence through no_std. Explain why embedded programs often use no_std and how it changes the libraries linked into a Rust application. Describe the useful language features still available through core.
- Missing facilities and runtime control. Describe the built-in facilities a no_std program lacks and the control the developer gains over entry point and runtime behavior.
- Bare-metal crate attributes. Explain where to put the no_std and no_main crate-level attributes and what each changes in a project without a runtime crate.
- Required panic handler. Explain why a no_std project needs a panic handler and describe the minimal behavior presented here.
- Minimal bare-metal execution path. Describe how _start serves as the example’s custom program entry point and why the application remains in an infinite loop. State that this bare-metal example uses no heap, file system, or operating-system services.
- Architecture-specific runtime support. Explain that no_std principles and the workflow for enabling no_std are nearly the same on Cortex-M and RISC-V, but startup and runtime support use different crates and may require different details.
- Architecture crate roles. Distinguish the CPU-access crates from the runtime crates for Cortex-M and RISC-V. Describe the processor features the former expose and the startup, memory initialization, and entry-point support the latter provide.
- Cortex-M crate responsibilities. Explain the distinct roles of cortex-m, cortex-m-rt, and panic-halt in the SysTick example.
- Portable peripheral trait interfaces. Explain how embedded-hal lets the lsm303agr driver work across Linux and a Blue Pill without knowing either platform's hardware details.
- Shared OutputPin contract. Explain how the OutputPin trait gives drivers a common way to control a digital output across platforms, and what its method signatures convey.
- HAL-specific trait implementations. Describe how different HAL designs implement the same OutputPin contract while hiding device-specific GPIO access.
- Reusable and testable blink logic. Explain why the same blink_led() logic can run with different boards’ HALs and be tested with mocks.
- PAC HAL and BSP roles. Distinguish how PACs, HALs, and BSPs relate: PACs expose a microcontroller family’s registers and bits, HALs provide safer high-level peripheral interfaces on top of PACs, and BSPs add support for a specific board.
- Support beyond dominant architectures. Describe how embedded Rust supports microcontroller families beyond Cortex-M and RISC-V, using examples to distinguish active support from less mature support.
What it builds on
- Using a project template with cargo-generate (chapter 2) · Using cargo generate with a project template to create a starting project.
- Key Tools in the Knurling Ecosystem (chapter 2) · The introduction to tools in the Knurling ecosystem provides context for cargo-embed.
- Installing and using OpenOCD (chapter 2) · The earlier introduction to installing and using OpenOCD supplies tool context.
- Targets and target triples explained (chapter 2) · Introduces target triples.
- What no_std excludes and what core provides (chapter 1) · The earlier discussion of what no_std excludes.
- What minimal runtime crates initialize (chapter 1) · Introduces the role of minimal runtime crates.
- Entry and panic requirements (chapter 1) · Introduces the need for panic handling in a bare-metal program.
Section by section
Introduction
The introduction explains why developers need to understand embedded Rust project structure beyond what a generated template provides.
- Limits of project templates: Explain why a generated project template is a useful starting point but not a substitute for understanding how to structure an embedded Rust project manually.
Why it matters: Understanding the structure yourself helps when a template is incomplete or outdated.
Key terms: cargo generate, project template, project structure
3.1 Understanding Rust embedded project structure
This introduction previews an overview of embedded Rust project files and configuration, including how they compare with desktop Rust projects.
3.1.1 A typical embedded Rust project layout
This section shows that an embedded Rust project resembles a standard Cargo project but adds files for hardware-specific build needs.
- Embedded project layout differences: Explain how a bare-metal Rust project can look like a familiar Cargo project while adding files for hardware-specific requirements.
Why it matters: It helps you recognize why an embedded project needs more configuration than an ordinary Cargo project.
Key terms: bare-metal Rust project, memory.x, .cargo/config.toml, build.rs
3.1.2 The role of Cargo.toml in embedded projects
This section explains how Cargo.toml describes an embedded project and tailors its build to a microcontroller through profiles and dependency features.
- Embedded project manifest: Describe Cargo.toml as the central manifest for package metadata, dependencies, and build profiles, and explain why its settings must suit bare-metal execution.
Why it matters: The manifest is where an embedded project declares the choices that shape its build. - Release binary size settings: Explain how opt-level = "z" and link-time optimization are used to reduce an embedded release binary's size.
Why it matters: A smaller binary helps firmware fit the limited memory available on a microcontroller. - Compile-time dependency features: Explain how Cargo feature flags select optional functionality so an embedded build includes what its hardware and application need rather than every available code path.
Why it matters: Feature selection helps keep firmware appropriate for its target without bringing along unneeded functionality. - STM32 HAL feature meanings: Distinguish what the stm32f103, medium, and rt features select in the section's stm32f1xx-hal example.
Why it matters: These example flags show how a dependency can be matched to both a specific chip and the runtime support an application uses.
Key terms: Cargo.toml, manifest, package metadata, dependencies, build profiles, release profile, opt-level = "z", link-time optimization, LTO, code footprint
3.1.3 Cargo.lock: Ensuring dependency reproducibility
This section explains how Cargo.lock keeps embedded builds reproducible by recording specific dependency versions.
- Reproducible dependency versions: Explain how Cargo.lock fixes dependency versions across builds and why that matters for embedded binaries.
Why it matters: Stable dependency versions help keep an embedded binary’s behavior consistent across builds.
Key terms: Cargo.lock, dependency tree, reproducibility
3.1.4 Optional: Embed.toml and advanced tool integration
This subsection explains the optional role of Embed.toml in cargo-embed workflows and why later examples use OpenOCD instead.
- Optional cargo-embed configuration: Explain how Embed.toml configures cargo-embed for a project, what kinds of settings it can hold, and why an embedded Rust project does not require it.
Why it matters: It helps you recognize when Embed.toml is useful without mistaking it for a required project file. - OpenOCD default rationale: Explain why the book’s later examples default to OpenOCD for flashing and debugging despite introducing Embed.toml.
Why it matters: It clarifies that the choice of OpenOCD in later examples is about familiarity, not a requirement imposed by embedded Rust.
Key terms: Embed.toml, cargo-embed, probe-rs, RTT, GDB, OpenOCD, .cargo/config.toml, flashing/debugging backend
3.2 Build system & linker configuration
Introduces build-system and linker configuration as a way to tailor an embedded Rust project to its target hardware.
- Purpose of build configuration: Explain why an embedded Rust project needs build-system and linker configuration in addition to its basic project structure.
Why it matters: The project layout alone does not provide all the control needed to build reliably for specific hardware.
Key terms: build system, linker configurations, target hardware, reliable and reproducible embedded builds
3.2.1 Defining memory layout with memory.x
This section explains how a runtime-specific memory.x file describes a microcontroller’s memory regions so the linker can place firmware correctly.
- memory.x and linker script roles: Distinguish memory.x from a general linker script: runtime crates such as cortex-m-rt and riscv-rt generate a link.x that includes a project-supplied memory.x, typically at the crate root.
Why it matters: It helps you recognize which file your runtime expects you to provide. - Memory region definitions and accuracy: Explain what FLASH and RAM definitions in memory.x specify, how they guide linker placement, and why they must match the microcontroller’s data sheet.
Why it matters: A memory map that does not match the chip can produce firmware that links but faults almost immediately.
Key terms: memory.x, link.x, linker script, cortex-m-rt, riscv-rt, FLASH, RAM, ORIGIN, LENGTH, access permissions
3.2.2 Optional build-time customization with build.rs
This section explains when an embedded Rust project needs an optional build.rs script and illustrates how it can generate a linker script at build time.
- Optional build script role: Explain when build.rs is useful and when it is unnecessary, and describe when Cargo runs it.
Why it matters: It helps you avoid adding build machinery unless your project needs custom build-time work. - Generated linker script workflow: Trace the section’s example of using build.rs to generate memory.x and make it available to the linker.
Why it matters: Generating the file is not enough; the linker must also be directed to where it was written.
Key terms: build.rs, build script, Cargo, memory.x, OUT_DIR, linker’s search path
3.2.3 The role of .cargo/config.toml in embedded Rust
The section explains how .cargo/config.toml makes embedded builds consistent by setting the target, runner, and linker flags in one place.
- Embedded build configuration: Explain how .cargo/config.toml sets an embedded target and passes linker-script flags, and why keeping these settings in the project simplifies Cargo commands.
Why it matters: Project-wide settings make builds more predictable and reduce command-line mistakes. - Firmware runner selection: Describe what the runner setting controls and how the section switches from an OpenOCD-based debugging path to probe-rs.
Why it matters: You can change how firmware is flashed and run without changing the target or memory-layout configuration.
Key terms: .cargo/config.toml, [build], target triple, rustflags, link.x, runner, gdb-multiarch, OpenOCD, probe-rs run, Embed.toml
3.3 Managing features & dependencies in Cargo
The section introduces feature and dependency management as the next topic for tailoring embedded Rust firmware to hardware variants and build scenarios.
3.3.1 The importance of features in embedded Rust
This section explains why Cargo features help embedded firmware include only needed functionality while supporting different hardware and build configurations.
- Purpose of Cargo features: Explain why embedded projects use Cargo features to conditionally include optional components, and describe how this helps with code size and different hardware or debugging configurations.
Why it matters: Features let one project accommodate different devices and build needs without including unnecessary functionality.
Key terms: Cargo features, optional components, hardware variants, debugging and production configurations
3.3.2 Defining features in Cargo.toml
This section shows how Cargo features select optional embedded dependencies and how to run either a default panic-halt build or a semihosting build.
- Optional dependencies and named features: Explain how optional dependencies and named features are declared in Cargo.toml, using the panic and semihosting dependencies as examples.
Why it matters: Named features let a project include debugging dependencies only when they are needed. - Default and semihosting builds: Distinguish the default panic-halt build from the semihosting build, including the commands that select them and the possibility of conditionally compiled Rust code.
Why it matters: The build command determines whether firmware uses the minimal default panic handler or the semihosting configuration. - Runner requirement for flashing: State the condition under which the example cargo run commands flash and run the firmware through probe-rs.
Why it matters: Selecting a feature does not by itself configure how Cargo launches firmware on a board.
Key terms: Cargo.toml, optional, [features], semihosting, default, panic-halt, --no-default-features, --features semihosting, conditionally compiled, .cargo/config.toml
3.3.3 Target-specific dependencies
This section explains how Cargo restricts dependencies to particular target architectures or build environments.
- Target-Specific Dependency Selection: Explain that Cargo can include a dependency only for matching build targets, allowing one codebase to use different support crates for different architectures.
Why it matters: Target-specific dependencies let a shared project include the support crates appropriate to each build.
Key terms: conditional dependency declarations, target-specific configuration options, support crates
3.3.4 Discovering and Understanding Features in Dependencies
This section shows how to find a dependency’s features, trace which ones are enabled, and avoid unsuitable defaults in bare-metal builds.
- Dependency feature discovery: Describe where to find a crate’s available features and default features, and where to check the full feature definitions.
Why it matters: Checking a crate’s features lets you choose its compile-time configuration deliberately. - Enabled feature tracing: Explain what cargo tree -e features shows about features in your build.
Why it matters: An enabled feature may come through another dependency rather than one you selected directly. - Bare-metal default feature control: Justify disabling a dependency’s default features and enabling only those required for a bare-metal build.
Why it matters: Being no_std-capable does not guarantee that a crate’s default configuration suits bare metal.
Key terms: features, Cargo.toml, [features], crates.io, docs.rs, cargo tree -e features, dependency tree, enabled features, default features, std
3.4 Configuring no_std for embedded systems
The section introduces why bare-metal microcontroller firmware uses Rust without the standard library.
- Bare-metal no_std rationale: Explain why a Rust project for a bare-metal microcontroller is configured to operate without the standard library.
Why it matters: This explains the constraint behind the project configuration discussed next.
Key terms: bare-metal microcontrollers, no_std, standard library
3.4.1 What does no_std mean in embedded Rust?
Explains why bare-metal Rust uses no_std, what core still provides, and which standard-library facilities are unavailable without additional support.
- OS independence through no_std: Explain why embedded programs often use no_std and how it changes the libraries linked into a Rust application. Describe the useful language features still available through core.
Why it matters: This explains why no_std is appropriate for a device without an operating system without implying that basic Rust facilities disappear. - Missing facilities and runtime control: Describe the built-in facilities a no_std program lacks and the control the developer gains over entry point and runtime behavior.
Why it matters: These boundaries show what a no_std application cannot assume the runtime will provide.
Key terms: std crate, no_std mode, core crate, dynamic memory allocation, allocator, entry point, runtime behavior
3.4.2 How to set-up a no_std project
This section explains the crate attributes and panic handler required for a bare-metal no_std project without a runtime crate.
- Bare-metal crate attributes: Explain where to put the no_std and no_main crate-level attributes and what each changes in a project without a runtime crate.
Why it matters: These attributes establish which startup responsibilities the project takes on itself. - Required panic handler: Explain why a no_std project needs a panic handler and describe the minimal behavior presented here.
Why it matters: Disabling the standard library also means supplying a response to panics.
Key terms: no_std, no_main, crate-level attributes, main.rs, lib.rs, panic handler, standard library’s panic support, infinite loop
3.4.3 A minimal bare-metal no_std example
This section describes a minimal bare-metal no_std application through its custom entry point, infinite loop, and lack of operating-system services.
- Minimal bare-metal execution path: Describe how _start serves as the example’s custom program entry point and why the application remains in an infinite loop. State that this bare-metal example uses no heap, file system, or operating-system services.
Why it matters: This identifies the small set of assumptions the example makes about bare-metal execution.
Key terms: no_std, _start, custom program entry point, infinite loop, bare-metal
3.4.4 Platform-specific aspects: Cortex-M vs. RISC-V
This section compares the architecture-specific runtime support used to start no_std programs on Cortex-M and RISC-V.
- Architecture-specific runtime support: Explain that no_std principles and the workflow for enabling no_std are nearly the same on Cortex-M and RISC-V, but startup and runtime support use different crates and may require different details.
Why it matters: It helps you keep the shared no_std approach while choosing runtime support for the target architecture. - Cortex-M entry and panic roles: Describe how the Cortex-M example identifies its entry point and supplies a panic handler without relying on the ordinary main entry convention.
Why it matters: It clarifies which parts of the Cortex-M example establish startup and panic behavior.
Key terms: no_std, cortex-m-rt, riscv-rt, startup code, interrupt vector table, #[entry], main, panic-halt
3.5 Setting-up commonly used embedded crates
3.5.1 Core architecture crates
This section identifies the architecture-specific crates that provide CPU access and bare-metal runtime support for Cortex-M and RISC-V, along with crates for panic behavior and debug output.
- Architecture crate roles: Distinguish the CPU-access crates from the runtime crates for Cortex-M and RISC-V. Describe the processor features the former expose and the startup, memory initialization, and entry-point support the latter provide.
Why it matters: The distinction helps you choose the right crate when you need processor access versus startup support. - Panic and debugging utilities: Explain how the supporting crates described here provide panic behavior and debug output, including why a project might choose panic-halt or panic-semihosting.
Why it matters: These crates let a project choose how failures behave and how debug messages are sent.
Key terms: cortex-m, cortex-m-rt, riscv, riscv-rt, SysTick, NVIC, panic-halt, panic-semihosting, panic-itm, cortex-m-semihosting
3.5.2 Practical example: Using Cortex-M crates together
A SysTick example shows how three Cortex-M crates divide responsibility for peripheral access, runtime hooks, and panic behavior.
- Cortex-M crate responsibilities: Explain the distinct roles of cortex-m, cortex-m-rt, and panic-halt in the SysTick example.
Why it matters: Keeping these roles separate helps you see what each crate contributes to a bare-metal application.
Key terms: SysTick, cortex-m, cortex-m-rt, #[entry], #[exception], panic-halt
3.5.3 The embedded HAL ecosystem
This section explains how embedded-hal traits let one sensor driver work across Linux and bare-metal hardware, while each platform supplies its own peripheral setup and trait implementations.
- Portable peripheral trait interfaces: Explain how embedded-hal lets the lsm303agr driver work across Linux and a Blue Pill without knowing either platform's hardware details.
Why it matters: A driver written against shared interfaces can be reused with different hardware implementations. - Platform-specific I2C preparation: Distinguish Linux I2C access from the setup required before using I2C on the bare-metal Blue Pill, including why its pins use alternate-function open-drain mode.
Why it matters: Driver portability does not remove the need to initialize each platform's hardware correctly. - Complementary embedded HAL crates: Describe the additional interfaces or utilities provided by the embedded-hal companion crates named here.
Why it matters: These crates show where to look when a driver needs more than the basic peripheral traits.
Key terms: embedded-hal, traits, I2C, delay provider, lsm303agr, I2cdev, peripheral clocks, PB6, PB7, alternate-function open-drain
3.5.4 Example: Implementing an embedded-hal trait for platform agnostic drivers
This section shows how trait-based peripheral interfaces let embedded Rust drivers work across microcontrollers while each chip’s HAL handles its hardware details.
- Shared OutputPin contract: Explain how the OutputPin trait gives drivers a common way to control a digital output across platforms, and what its method signatures convey.
Why it matters: A driver can depend on the pin operations it needs without depending on a particular chip’s GPIO API. - HAL-specific trait implementations: Describe how different HAL designs implement the same OutputPin contract while hiding device-specific GPIO access.
Why it matters: The HAL absorbs hardware differences so reusable code does not have to handle GPIO register layouts itself. - Reusable and testable blink logic: Explain why the same blink_led() logic can run with different boards’ HALs and be tested with mocks.
Why it matters: Separating behavior from hardware setup enables both cross-board reuse and tests without a physical device. - Trait-based UART echo: Describe how the GPIO example’s portability principle extends to the UART echo routine through Read and Write traits.
Why it matters: The same separation between generic behavior and hardware implementation applies beyond GPIO.
Key terms: OutputPin, set_high(), set_low(), Result<(), Self::Error>, &mut self, HAL, strongly-typed pin, GPIO controller, memory-mapped GPIO registers, blink_led()
3.5.5 Peripheral access crates (PACs), Hardware Abstraction Layers (HALs), and Board Support Packages (BSPs)
Distinguishes PACs, HALs, and BSPs by the level of hardware access and support each provides.
- PAC HAL and BSP roles: Distinguish how PACs, HALs, and BSPs relate: PACs expose a microcontroller family’s registers and bits, HALs provide safer high-level peripheral interfaces on top of PACs, and BSPs add support for a specific board.
Why it matters: The distinction helps you choose the level of hardware detail your project needs.
Key terms: Peripheral Access Crates (PACs), Hardware Abstraction Layers (HALs), Board Support Packages (BSPs)
3.5.6 Expanding beyond Cortex-M and RISC-V
This section shows that embedded Rust support extends beyond Cortex-M and RISC-V, but varies in maturity across microcontroller families.
- Support beyond dominant architectures: Describe how embedded Rust supports microcontroller families beyond Cortex-M and RISC-V, using examples to distinguish active support from less mature support.
Why it matters: The available crates and their maturity affect which embedded Rust approach is practical for a given chip.
Key terms: Cortex-M, RISC-V, AVR, ESP32, TriCore, MSP430
3.6 Summary
Where this is used later
- Configuring cargo-embed with Embed.toml (chapter 6) · Configuring cargo-embed with Embed.toml builds on its role as a per-project tool configuration file.
- Defining the memory layout for your embedded Rust program (chapter 4) · Defining a memory layout with memory.x introduces the linker configuration used here.
- Memory initialization: LMA, VMA, and data movement (chapter 4) · Defining a device’s memory layout.
- Defining physical memory regions (chapter 4) · Defining physical memory regions builds on the purpose of device-specific FLASH and RAM definitions.
- Mapping output sections (chapter 4) · Mapping output sections builds on how region definitions guide linker placement.
- Automating bindgen in build.rs (chapter 8) · Build-script automation relies on understanding that Cargo runs build.rs before building the application.
- Linking C code: direct and indirect (chapter 8) · The role of build.rs in build-time customization
- A Complete minimal linker script example (chapter 4) · Uses the idea that a linker script must be supplied for the hardware’s memory layout.
Concepts explained in this chapter
- embedded-halembedded-hal is a Rust crate defining standardized traits for accessing common embedded peripherals and services independently of specific hardware.
- hardware abstraction layerA hardware abstraction layer is a software interface that represents hardware peripherals while hiding device-specific implementation details.
- cargo.tomlCargo.toml is the TOML-formatted manifest file that declares a Rust package's metadata, dependencies, and build configuration.
- cargo featureA Cargo feature is a named compile-time option that conditionally enables code or dependencies in a Rust package.
- device driverA device driver is software that presents an interface for controlling and communicating with a hardware device.
- outputpinOutputPin is an embedded-hal trait defining operations for driving a digital output pin high or low.
- portabilityPortability is the ability of software or development methods to operate across different hardware architectures or platforms with limited adaptation.
- no_std programno_std is a Rust crate configuration that excludes the standard library.
- runner configurationA Cargo runner is a target-specific setting that specifies the command used to launch or flash a built program.
- .cargo/config.toml.cargo/config.toml is Cargo's project configuration file for specifying build targets, linker arguments, and runner commands.
- memory.xmemory.x is a conventional linker-script fragment that declares embedded memory regions for a Rust firmware build.
- build scriptA Cargo build script is a Rust program, conventionally named build.rs, that Cargo runs before compiling a package to perform build-time tasks.
- peripheral access crateA peripheral access crate is a typically auto-generated Rust library that exposes fine-grained access to the registers and bit fields of a specific microcontroller family.
- linker scriptA linker script is a script that directs a linker when arranging input sections and assigning addresses in an output image.
- Embed.tomlEmbed.toml is a project configuration file used by cargo-embed to specify embedded-target settings such as the chip, probe protocol, and enabled features.
- stm32f1xx-halstm32f1xx-hal is a Rust hardware abstraction layer crate for STM32F1 microcontrollers.
- semihostingSemihosting is a development technique in which code on a target device requests services such as text output from a host debugger through a debug connection.
- Arm Cortex-MArm Cortex-M is a family of energy-efficient processor cores designed primarily for microcontrollers and embedded systems.
- cortex-m-rtcortex-m-rt is a Rust runtime crate that provides startup and exception-handling support for Cortex-M microcontrollers.
- embedded RustEmbedded Rust is the practice of developing firmware for embedded or bare-metal targets using Rust.
- cargo-embedcargo-embed is a Cargo subcommand for flashing and debugging embedded targets with project-file-based configuration and RTT output streaming.
- target tripleA target triple is a standardized identifier describing the processor architecture, vendor, operating system, and binary environment for which software is built.
- memory layoutA memory layout specifies the placement of a program's code, data, stack, and other regions in memory.
- cargo-generatecargo-generate is a Cargo subcommand that creates projects from templates.
- core libraryRust's core crate provides fundamental types, traits, and APIs without depending on an operating system or heap.
- entry pointThe function or location at which execution begins for a program or runtime path.
- CargoCargo is Rust's package manager and build system, providing dependency management, compilation, testing, and related project workflows.
- control and status registerA system register is a processor register in the architectural system-register file that controls or reports execution state and core configuration.
- dynamic allocationHeap allocation is the dynamic reservation of memory from a program's heap.
- panic handlerA panic handler is the Rust-defined function that determines how a panic is handled in a target without the hosted panic runtime.
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.
