| Crates.io | wim-parser |
| lib.rs | wim-parser |
| version | 0.1.1 |
| created_at | 2025-07-14 09:02:31.656833+00 |
| updated_at | 2025-07-15 03:39:38.249752+00 |
| description | A Rust library for parsing Windows Imaging (WIM) files |
| homepage | https://github.com/junjiangao/wim-parser |
| repository | https://github.com/junjiangao/wim-parser |
| max_upload_size | |
| id | 1751393 |
| size | 96,270 |
A Rust library for parsing Windows Imaging (WIM) files.
tracingAdd this to your Cargo.toml:
[dependencies]
wim-parser = "0.1"
use wim_parser::WimParser;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut parser = WimParser::new("path/to/install.wim")?;
parser.parse_full()?;
// Get basic information
println!("Image count: {}", parser.get_image_count());
println!("Compressed: {}", parser.is_compressed());
// Iterate through images
for image in parser.get_images() {
println!("Image: {}", image.name);
println!(" Files: {}", image.file_count);
println!(" Directories: {}", image.dir_count);
println!(" Total size: {} bytes", image.total_bytes);
if let Some(version) = &image.version {
println!(" Version: {}", version);
}
if let Some(arch) = &image.architecture {
println!(" Architecture: {}", arch);
}
}
// Get Windows-specific information
if let Some(windows_info) = parser.get_windows_info() {
println!("Windows Info: {}", windows_info);
}
Ok(())
}
If you don't need logging functionality, you can disable it:
[dependencies]
wim-parser = { version = "0.1", default-features = false }
WimParser - Main parser for WIM filesWimHeader - WIM file header informationImageInfo - Individual image metadataWindowsInfo - Windows-specific information summaryWimParser::new() - Create a new parserparse_full() - Parse the entire WIM fileget_images() - Get all image informationget_windows_info() - Get Windows-specific summaryhas_version() - Check for specific Windows versionhas_architecture() - Check for specific architectureWIM (Windows Imaging) files are archive files used by Microsoft for Windows installation media. This library supports:
The library can identify the following architectures:
x86 (32-bit Intel/AMD)x64 (64-bit Intel/AMD)ARM (32-bit ARM)ARM64 (64-bit ARM)Supports detection of:
The library uses anyhow for error handling, providing detailed error messages for common issues:
See the examples/ directory for more detailed usage examples.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
This project uses automated release workflows for publishing to both GitHub Releases and crates.io.
Cargo.tomlgit tag v0.1.1
git push origin v0.1.1
Cargo.tomlYou can also trigger a release manually using GitHub Actions:
v0.1.0)Cargo.toml version🔧 Performance & Quality Improvements
📚 Documentation & Examples
🛠️ Development Experience