Skip to content

google/gpt-disk-rs

gpt-disk-rs

Coverage Status

no_std libraries related to GPT (GUID Partition Table) disk data. There are three Rust packages in this repository:

Crates.io Docs.rs

The uguid package provides the GUID type used in the UEFI Specification, and also in Microsoft Windows.

Crates.io Docs.rs

The gpt_disk_types package provides flexible types for all the GPT types defined in the UEFI Specification. The types are designed to ensure correct endianness regardless of host platform, and can be used even with corrupted input data.

Crates.io Docs.rs

The gpt_disk_io package depends on gpt_disk_types and adds types for reading and writing GPT data to an abstract disk interface. This interface can be implemented for any backend that supports block-level IO.

Code layout

uguid/src:

  • error.rs: Parse error type.
  • guid.rs: Provides the Guid type.
  • lib.rs: Contains the public GUID-creation macros.
  • util.rs: ASCII conversion utilities.

gpt_disk_types/src:

  • block.rs: Numeric types for addressing blocks.
  • crc32.rs: CRC32 type.
  • header.rs: GPT header and related types.
  • mbr.rs: Legacy master boot record types.
  • num.rs: Little-endian integer types.
  • partition_array.rs: GPT partition array types.
  • partition_entry.rs: GPT partition array entry types.
  • std_support.rs: Provides std trait impls when the std feature is enabled.

gpt_disk_io/src:

  • block_io.rs: BlockIo trait for generic read/write operations.
  • block_io/slice_block_io.rs: In-memory byte slice implementations of BlockIo.
  • block_io/std_block_io.rs: std::io-backed implementation of BlockIo (requires std feature).
  • disk.rs: Read and write GPT data from a block device.
  • std_support.rs: Provides std trait impls when the std feature is enabled.

Most of the tests are under gpt_disk_io/tests, including the tests for gpt_disk_types. Having all the tests in one place allow them to share code.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Disclaimer

This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.

About

Rust libraries for working with GPT (GUID Partition Table) disk data

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Languages