WIM Parser
A Rust library for parsing Windows Imaging (WIM) files.
Features
- 🔍 Parse WIM file headers and metadata
- 📊 Extract detailed image information
- 🏗️ Support for multiple compression formats (XPRESS, LZX)
- 🪟 Windows version detection (Windows 10, 11, Server editions)
- 🏛️ Architecture identification (x86, x64, ARM, ARM64)
- 📝 Comprehensive XML metadata parsing
- 🔧 Optional logging support with
tracing
Quick Start
Add this to your Cargo.toml:
[]
= "0.1"
Basic Usage
use WimParser;
Without Logging
If you don't need logging functionality, you can disable it:
[]
= { = "0.1", = false }
API Overview
Core Types
WimParser- Main parser for WIM filesWimHeader- WIM file header informationImageInfo- Individual image metadataWindowsInfo- Windows-specific information summary
Key Methods
WimParser::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 architecture
WIM File Format
WIM (Windows Imaging) files are archive files used by Microsoft for Windows installation media. This library supports:
- WIM Header: File signature, metadata, and resource information
- XML Data: Detailed image metadata including version and architecture
- Compression: XPRESS and LZX compression detection
- Multiple Images: Support for WIM files containing multiple Windows editions
Architecture Detection
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)
Version Detection
Supports detection of:
- Windows 10 (various editions)
- Windows 11 (various editions)
- Windows Server 2019/2022
- Generic Windows versions
Error Handling
The library uses anyhow for error handling, providing detailed error messages for common issues:
- Invalid WIM file signatures
- Corrupted file headers
- Missing or invalid XML data
- I/O errors during file reading
Examples
See the examples/ directory for more detailed usage examples.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Release Process
This project uses automated release workflows for publishing to both GitHub Releases and crates.io.
For Maintainers
- Update version in
Cargo.toml - Create and push a version tag:
- GitHub Actions will automatically:
- Run comprehensive tests and validation
- Verify version consistency between Git tag and
Cargo.toml - Create a GitHub Release with auto-generated changelog
- Publish to crates.io (requires manual approval in GitHub Actions)
Manual Release Trigger
You can also trigger a release manually using GitHub Actions:
- Go to the Actions tab
- Select "Release and Publish" workflow
- Click "Run workflow" and specify the version
Release Requirements
- Version must follow semantic versioning (e.g.,
v0.1.0) - Git tag version must match
Cargo.tomlversion - All tests must pass
- Code must be properly formatted and pass clippy checks
- Package must build successfully
Changelog
0.1.1
-
🔧 Performance & Quality Improvements
- Enhanced XML parsing performance with optimized string handling
- Improved memory allocation patterns for better efficiency
- Fixed all clippy warnings for better code quality
- Optimized format string usage throughout codebase
-
📚 Documentation & Examples
- Enhanced performance comparison examples with better benchmarking
- Improved API documentation with clearer usage examples
- Added comprehensive error handling examples
- Better code organization and readability
-
🛠️ Development Experience
- Enhanced test coverage and reliability
- Improved benchmark suite with memory allocation tests
- Better error messages and debugging information
- Code quality improvements for maintainability
0.1.0
- Initial release
- Basic WIM file parsing
- Image information extraction
- Windows version and architecture detection
- Optional logging support