listdisk-rs
listdisk-rs is a Rust project for disk and drive information utilities, featuring multiple example programs and modular features. It is written entirely in Rust.
Features
- Modular feature flags: volume, logical-drives, freespace, drive-info, serde, and more.
- Supports Windows storage APIs (via
windows-sys), WMI querying, and Unicode/UTF-16 strings. - Example binaries for volume listing, drive info, freespace reporting, and full usage.
- Logging support (
log,pretty_env_logger). - Error handling with
thiserrorand convenience crates for development.
Getting Started
Requirements
- Rust (Edition 2024 or later)
Building
Clone this repo:
Build the project:
Run a specific example (replace EXAMPLE as needed):
Feature flags
Enable features with Cargo's --features flag, e.g.:
See the Cargo.toml for the complete list of available features.
Project Structure
src/: Main source codeexamples/: Example binariesCargo.toml: Feature and dependency configuration
Dependencies
Key dependencies:
- log
- utf16string (optional)
- windows-sys (optional)
- bitvec (optional)
- wmi (optional)
- serde (optional)
- thiserror
License
See Cargo.toml for more information about this project and its licensing.
100% Rust. See also the Cargo.toml for all configuration details.