Using Rust in Windows
jonathanturner.org
jonathanturner.org
(Note that 15.0 == VS2017, not VS2015)
Most stuff Just Works, but there are still some rough edges. A lot of them are simply "I'm not used to the Windows Way" yet instead of Rust problems, though.
It's actually kinda hard to even do; the files are hidden by default, so you have to really go snooping to do this.
Linux -> Windows works just fine. Windows -> Linux, not so much.
Then as long as you don't try to look into the WSL side from Windows you'll be fine.
Longer term, I would like to see some way for a crate consumer to optionally replace openssl with ring [2] where possible. But that's a harder problem, figuring out a common interface, specifying two crates satisfy that interface and are swappable by cargo...classic package management problems really.
[0] https://github.com/sfackler/rust-native-tls
[1] https://docs.rs/hyper-native-tls/0.2.2/hyper_native_tls/
It could use more contributors/eyes/auditors. It works out of the box on Windows currently.
I really like Rust, but compiling OpenSSL was a huge headache for me. One of those growing pains i felt like.
Can't wait until we can just use ring everywhere, though.
For me it was only stopping my investigations into hyper and other web stuff (on windows), just writing CLI and GUI apps works fine on Windows. (I use VS Code and a git bash)
It's a bit out of date, but I think it should help navigate the setup.
That would make it possible to generate Windows binaries without having to run a Windows VM, through cross-compiling, using e.g. MXE: http://mxe.cc/
My go-to is VSCode + Rust plugin. You get the same debugging as VS2015 via C++ plugin(they both use the same backend). Only time I need to drop over to MSVC is if I need data breakpoints or look at disassembly(usually when I'm dealing with a C library that's misbehaving).
VSCode rust plugin gets you racer, rustfmt and a bunch of other goodies(cargo test/check right in the IDE).
I really do like VS Code though... looks like there's some work going there.
I seriously hope they add a lazy load feature in the future.
But even with that turned off, opening large solutions is vastly faster than in VS2015.
It gives you the comfort features known from the IntelliJ platform and doesn't add phonehome telemetry to your exe files (like VS2k15).
https://www.infoq.com/news/2016/06/visual-cpp-telemetry
Appearently they backed off, due to major outcry. The usual salami tactics.
Nevertheless to this day developers compile binaries with the affected compiler version - still in release builds of various up-to-date software.
Btw Microsoft representative itself called it telemetry, confirm they added it without any warning, cloud it all in high grade bullshitspeak, while order for removing it in hurry, or just rename/disguise functions "to remove any suspicions" as they do with spying (sorry, complete anonymous telemetry that helps to improve the product) services in Windows 10?
https://www.reddit.com/r/cpp/comments/4ibauu/visual_studio_a...
But binaries are also ELF binaries and can only be run with lxss. How do you deploy to Windows customers who are not developers?
Source: I'm just using regular old Windows now...