It's impressive that Rust can build a working Microsoft Windows executable under Linux. Even at the game level, with full 3D capabilities. Here's an example of mine to show it all working. That's using the Rend3/Egui->WGPU graphics systems, and they're now all portable enough that cross-compiling works. That's a remarkable achievement. Game devs need this.
But once you have a .exe file, you need to build an installer, a .msi or .msix file, to ship. This is not, unfortunately, a standard cargo function. I'd like to see that added.
All the parts exist, but they don't connect and don't work cross-platform. Here's what's available to build upon.
-
cargo-bundle Now, this does exactly the right thing. It's integrated with the Rust ecosystem. It gets the data it needs from the Cargo.toml file. It's installed with
cargo install cargo-bundle.
The only problem is that it doesn't work for Windows targets. The Windows target part is unimplemented. Only Mac targets are implemented. So, what I'm asking for is that this be completed and made a part of the Rust tooling. - WiX This toolset has, internally, the code to create .msi files. It only runs on Windows, and has many of non-Rust dependencies. But that's a source of open-source code for making .msi files. Internally, Wix had two Windows executables, candle.exe and flame.exe, which did all the work. They took in XML and other files and emitted .msi files. So that's where to look for code to do this.
- Tauri This is a full toolset, an alternative to cargo. It's mostly intended for web apps. It used to have a standalone executable called tauri-bundler, which was a based on cargo-bundle. That could successfully make .msi files. But inside, it was calling candle.exe and flame.exe. The Tauri developers made the bundler into a library, which is useful if you want to integrate it into something else. But you still need to be able to run candle.exe and flame.exe, which are Windows-only.
So, is there interest in this? All the necessary parts seem to exist. This needs someone who lives in Windows land, and understands Windows installers, which I do not.
It seems a lack that the Rust system can cross-compile all the way to a Windows executable, but not do the last step needed to make a usable application.