Cross compile and run Windows-binaries on Linux using Rust

Do you for some reason want to create windows-libraries on (Ubuntu) Linux?

sudo apt install gcc-mingw-w64
rustup target add x86_64-pc-windows-gnu
cargo build --target x86_64-pc-windows-gnu

wine target/x86_64-pc-windows-gnu/debug/test-windows-ccompile.exe

So easy, and it actually works! Why do you want to do this? I have a dll-file I want to use, and dll-files are windows-only. But I don’t want to run a windows-installation. But creating and running windows-binaries on Linux means that it might be possible to interface with the dll-file without running Windows.