jedisct1 / libsodium-sys-stable

Sodiumoxide's libsodium-sys crate, but that installs stable versions of libsodium.
MIT License
35 stars 6 forks source link

Fetch latest on Windows by default #6

Closed tom25519 closed 2 years ago

tom25519 commented 2 years ago

Hey, sorry for the inconvenience with the previous PR, wasn't aware that you wouldn't be able to push the Windows artefacts to Crates.io.

This PR changes the build configuration for Windows so that it always downloads the latest MSVC/MinGW prebuilt binaries by default, since they can't be shipped as part of the crate.

Thanks!

jedisct1 commented 2 years ago

Yep, unfortunately, crates.io has a limit on the crate sizes :(

Downloading them at compile-time sounds like a reasonable workaround, then.

Thanks for the PR! I'll try to push a new version with it.

jedisct1 commented 2 years ago

Doesn't cargo have a way to enable a feature on a specific platform? So that we could enable fetch-latest on Windows, rather than duplicating the ureq dependency?

Just curious. This is not going to make any difference to the compiled code :)

tom25519 commented 2 years ago

Yeah, I thought that duplication was a bit ugly at the time but couldn't immediately find a solution (trying to specify a [target.'cfg(windows)'.features] section was just ignored). I'll see if I can work something out a bit later this evening :)

jedisct1 commented 2 years ago

No biggie. Let's merge it as-is, and if you find a way, that can always be updated later!

tom25519 commented 2 years ago

Cheers, I took a look and couldn't really find anything promising, but if I come across anything in the future I'll make the change. Have a good day!

jedisct1 commented 2 years ago

Have a good day too!