hadris_fat/lib.rs
1//! A library for working with FAT32 file systems
2//! Supports reading and writing to FAT32 file systems,
3//! with no-std support
4//!
5//! When used with no features, the crate act as a place for providing the structures used in the
6//! FAT32 file system.
7//!
8//! ## Cargo Features
9//!
10//! - **alloc**: Enables the 'alloc' feature, which allows for dynamic allocation of memory
11//! - **std**: Enables the 'std' feature, which requires an 'std' environment
12//! - **read**: Enables the 'read' feature, which allows for reading from FAT32 file systems
13//! - **write**: Enables the 'write' feature, which allows for writing to FAT32 file systems
14//! - **lfn**: Enables the 'lfn' feature, which allows for reading and writing long file names,
15//! which is an optional extension to the FAT32 specification
16
17#![cfg_attr(not(feature = "std"), no_std)]
18
19#[cfg(feature = "alloc")]
20extern crate alloc;
21
22// TODO: Add support for big endian, because we currently just reinterpret the bytes as little endian
23
24#[cfg(not(target_endian = "little"))]
25compile_error!("This crate only supports little endian systems");
26
27pub mod structures;
28#[cfg(feature = "read")]
29pub mod fs;
30#[cfg(feature = "read")]
31pub use fs::*;
32