zboxfs / zbox

Zero-details, privacy-focused in-app file system.
https://zbox.io/fs/
Apache License 2.0
1.54k stars 76 forks source link

Fixed windows msvc download_and_install_libsodium in build.rs #79

Open raccoman opened 1 year ago

raccoman commented 1 year ago

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:

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 commented 1 year ago

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?