speck-core 0.2.0

Secure runtime package manager for MMU-less microcontrollers
Documentation
//! # Speck Core
//! 
//! Runtime package manager for MMU-less microcontrollers.
//! 
//! This crate provides:
//! - Secure code signing and verification (Ed25519)
//! - Efficient binary delta updates
//! - Flash-aware storage with wear leveling
//! - Position-independent code module format
//! 
//! ## Example
//! 
//! ```rust
//! use speck_core::{Module, KeyPair, DeltaBuilder};
//! 
//! // Generate signing keys
//! let keypair = KeyPair::generate();
//! 
//! // Create and sign a module
//! let code = vec![0x55, 0xAA, 0x00, 0x40]; // ARM Thumb code
//! let module = Module::builder()
//!     .code(code)
//!     .entry_offset(0)
//!     .sign(&keypair)
//!     .build()
//!     .expect("valid module");
//! 
//! // Verify the module
//! module.verify().expect("signature valid");
//! ```

#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs, missing_debug_implementations)]

extern crate alloc;

pub mod crypto;
pub mod delta;
pub mod error;
pub mod flash;
pub mod format;
pub mod storage;
pub mod util;

pub use crypto::{KeyPair, PublicKey, Signature};
pub use delta::{Delta, DeltaApplier, DeltaBuilder};
pub use error::{Error, Result};
pub use flash::{Flash, FlashConfig, PageId};
pub use format::{Module, ModuleBuilder, ModuleHeader, ModuleManifest};
pub use storage::{StorageManager, StorageConfig, InstallationStatus};

/// Library version constant
pub const VERSION: &str = env!("CARGO_PKG_VERSION");

/// Minimum compatible module format version
pub const MIN_MODULE_VERSION: u16 = 1;

/// Current module format version
pub const CURRENT_MODULE_VERSION: u16 = 2;