Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Fixed windows msvc download_and_install_libsodium in build.rs #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raccoman
Copy link

@raccoman raccoman commented Dec 2, 2022

I was recently working on a project using zboz, from windows with msvc.

I noticed that whenever I add the "libsodium-bundled" feature, cargo throws a File Not Found error, more precisely it cannot find libsodium.lib in the temporary ZIP archive. I checked and indeed the path is wrong. Currently I understand it to be:

  • libsodium/x64/Release/v142/static/libsodium.lib
  • libsodium/Win32/Release/v142/static/libsodium.lib

Also after changing the paths, cargo throws another error but this time from reqwest: "reqwest::get" is asynchronous. I added the "blocking" feature in Cargo.toml only in the windows target and changed the code to "reqwest::blocking::get"

@jedisct1
Copy link

jedisct1 commented Dec 2, 2022

As a side note, you should really use libsodium-stable rather than the old point release.

No security issues to worry about, but portability has been improved, as well as performance. AES-GCM for example, is 2.5 times faster.

The libsodium-sys-stable crate also bundles libsodium, and is constantly updated. Maybe a better place to add Windows support, if it doesn't already support it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants