Hi everyone,
I recently released virtual-file-transfer v0.1.0, a Rust crate for transferring virtual files through Windows drag-and-drop and the clipboard.
It allows applications to expose data from memory, ZIP archives, generated reports, or other streams as files without first writing them to temporary files.
The crate abstracts the Windows OLE/COM interfaces (IDataObject, IStream, etc.) behind a Rust API.
Features:
-
Single and multiple virtual files
-
Streaming and seekable data sources
-
Relative paths and file name validation
-
Cooperative cancellation and asynchronous completion reporting
-
Optional disk-backed spooling
I've tested transfers larger than 4 GiB with Windows Explorer, including data integrity, cancellation, and error propagation.
I realize this is a fairly niche use case, but I hope it can save other developers from having to implement the same Windows OLE/COM machinery themselves.
Links:
-
Documentation: virtual_file_transfer - Rust
This is my first release, and I'd appreciate any feedback, particularly on the API design, potential use cases, and compatibility with other Windows applications.