From 9f229ac7508187b1c6754984f0b33719e5f8167f Mon Sep 17 00:00:00 2001 From: Steven Schulteis Date: Sun, 16 Nov 2025 09:50:32 -0600 Subject: Add missing feature documentation for embassy-boot --- embassy-boot/Cargo.toml | 14 +++++++++++++- embassy-boot/src/lib.rs | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'embassy-boot') diff --git a/embassy-boot/Cargo.toml b/embassy-boot/Cargo.toml index 8c5c1f633..754c6e5f1 100644 --- a/embassy-boot/Cargo.toml +++ b/embassy-boot/Cargo.toml @@ -26,6 +26,7 @@ features = ["defmt"] [dependencies] defmt = { version = "1.0.1", optional = true } digest = "0.10" +document-features = "0.2.7" log = { version = "0.4", optional = true } ed25519-dalek = { version = "2", default-features = false, features = ["digest"], optional = true } embassy-embedded-hal = { version = "0.5.0", path = "../embassy-embedded-hal" } @@ -45,11 +46,22 @@ critical-section = { version = "1.1.1", features = ["std"] } ed25519-dalek = { version = "2", default-features = false, features = ["std", "rand_core", "digest"] } [features] +## Use [`defmt`](https://docs.rs/defmt/latest/defmt/) for logging defmt = ["dep:defmt"] +## Use log for logging log = ["dep:log"] + +## Enable for devices that set erased flash bytes to `0x00` instead of the usual `0xFF` +flash-erase-zero = [] + +#! ## Firmware Signing +#! Enable one of these features to allow verification of DFU signatures with +#! `FirmwareUpdater::verify_and_mark_updated`. + +## Use the `ed25519-dalek` package to verify DFU signatures. ed25519-dalek = ["dep:ed25519-dalek", "_verify"] +## Use the `salty` package to verify DFU signatures. ed25519-salty = ["dep:salty", "_verify"] -flash-erase-zero = [] #Internal features _verify = [] diff --git a/embassy-boot/src/lib.rs b/embassy-boot/src/lib.rs index 7dc811f66..3e61d6036 100644 --- a/embassy-boot/src/lib.rs +++ b/embassy-boot/src/lib.rs @@ -3,6 +3,10 @@ #![allow(unsafe_op_in_unsafe_fn)] #![warn(missing_docs)] #![doc = include_str!("../README.md")] + +//! ## Feature flags +#![doc = document_features::document_features!(feature_label = r#"{feature}"#)] + mod fmt; mod boot_loader; -- cgit