3 ms·
It's quite possible to develop in Rust for Windows without using Windows. Try my open source "ui-mock".[1] This is a test of the cross-platform stack. Just get
by Animats 4y ago
It's quite possible to develop in Rust for Windows without using Windows.
Try my open source "ui-mock".[1] This is a test of the cross-platform stack. Just get the repository with "git clone", and make sure you have Rust installed for target "x86_64-pc-windows-gnu". See the Cargo.toml file for build instructions.
This is a game-type user interface. It's just some menus and a 3D cube. It doesn't do much, but it exercises all the lower levels. This allows debugging cross-platform problems in a simple environment. The main crates used are winit (cross-plaform window event handling), wgpu (cross-plaform GPU handling), rfd (cross-platform file dialogs), keychain (cross-platform password storage), egui (Rust-native menus and dialogs), and rend3 (safe interface to wgpu). For graphics, it uses Vulkan, so it will run on Windows back to the last release of Windows 7. Not Windows 95, though; it's 64-bit. It will also run under Wine, so you don't even need a Windows system to test.
My metaverse client uses the same stack. It's compiled on Linux, and runs on both Linux and Windows. So I'm building a high-performance 3D graphics program for Windows without even owning a Windows system or using any Microsoft software.
[1] https://github.com/John-Nagle/ui-mock https://github.com/John-Nagle/ui-mock
- junon 4y agoI compile BGFX + SDL2 for use alongside Rust on WSL without using MSVC and can run the generated .exe directly from the command line. Works fine - the package management is a bit of a pain but not terrible (two commands to install dependencies instead of just `cargo build`), but overall it has worked absolutely perfectly.
- Animats 4y agoThose are more mainstream solutions than what I'm doing. I'm working to beat C++ OpenGL game performance. Most applications don't need to do that. And they don't need to idle at 100% of one CPU, redrawing every frame, as games do. Good old gtk is available cross-platform for Rust. If you're not doing a graphics intense program, that can be a good choice.
- qalmakka 4y agoWith xwin you can download a copy of the MSVC sysroot and use it to build Windows applications on Linux. LLVM reimplemented the entire MSVC toolchain and can thus link with MSVC libraries.