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
- 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.
Roadmap
-
MSFT_Disk,MSFT_DiskToPartition -
MSFT_DiskImage - result types for WMI methods
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.