Open CGMossa opened 11 months ago
Nice. Do you want to update the README documentation to mention it? Or update the crate documentation in lib.rs
?
With your blessing I can do either or both :)
I'm also exploring this option a bit more. Right now, I find the scoop
lacking. I've made one PR over there to help out (with one line also :( )
Let's go for both then please. :)
I've made pijul compile on Windows as well, with these instructions:
set VCPKG_DEFAULT_TRIPLET=x64-windows-static-md
vcpkg install openssl zstd pkgconf
set LIB=C:\dev\vcpkg\installed\x64-windows-static-md\lib
set PKG_CONFIG_PATH=C:\dev\vcpkg\installed\x64-windows-static-md\lib\pkgconfig
Apparently, if pkgconfig
is used then the last thing has to be set.
https://stackoverflow.com/questions/74498102/why-doesnt-my-windows-environment-properly-install-external-c-libraries
These instructions are very much scattered. I'm almost sure that I got the system figured out.
It cannot be done with using RUSTCWRAPPER="vcpkg env"
if you're wondering.
I've finally got this to work on the recommended rust toolchain. Previously discussed here #53 and #75. On Windows, we are recommended to use
stable-msvc
/nightly-msvc
.You can install that using
scoop
, or manually here https://github.com/microsoft/vcpkg#quick-start-windowsThen, you set the following environment variables globally
That's it, this made my test project compile just fine.
Use of these environment variables is described in https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#path_and_environment, and https://stackoverflow.com/questions/20483619/lib-vs-libpath-environment-variables-difference-for-ms-visual-c-c,
You can choose different triplet, see
vckpkg help triplet
, butx64-windows-static-md
is recommended byvcpkg-rs
.Even the
blas
-example works with this!vcpkg
would also (presumably) makeCMake
work on Windows.