devpath 1.0.1

UEFI Device Path parsing library
Documentation
  • Coverage
  • 100%
    397 out of 397 items documented0 out of 77 items with examples
  • Size
  • Source code size: 124.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 33.35 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • npmccallum

devpath

CI Crates.io License: MIT Rust

A no_std Rust library for parsing and manipulating UEFI device paths as defined in the UEFI 2.11 specification.

Usage

cargo add devpath

Basic Example

use devpath::{Paths, FromBytes};

// Parse device paths from raw bytes
let raw_bytes = &[
    0x02, 0x01, 0x0c, 0x00,  // ACPI device path
    0xd0, 0x41, 0x03, 0x0a,  // HID: PNP0A03 (PCI Root Bridge)
    0x00, 0x00, 0x00, 0x00,  // UID: 0
    0x01, 0x01, 0x06, 0x00,  // PCI device path  
    0x00, 0x1f,              // Function: 0, Device: 31
    0x7f, 0xff, 0x04, 0x00,  // End of device path
];

let paths = Paths::from_bytes(raw_bytes)?;
println!("Parsed {} device path(s)", paths.len());

Features

  • Complete UEFI 2.11 Support - All device path types: Hardware, ACPI, Messaging, Media, and BIOS
  • Type-Safe Parsing - Structured representation of device path nodes
  • no_std Compatible - Works in embedded and firmware environments
  • Zero Unsafe Code - Memory-safe parsing with comprehensive error handling

Device Path Types

  • Hardware - PCI, memory-mapped devices, controllers
  • ACPI - ACPI namespace devices, _ADR devices
  • Messaging - USB, SATA, NVMe, network protocols, Bluetooth
  • Media - Hard drives, file paths, CD-ROM, RAM disks
  • BIOS - Legacy BIOS boot specification devices

Documentation

Full API documentation is available on docs.rs.

License

This project is licensed under the MIT License.