Add Windows support to the Curl backend #2007
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting pull request:
sbt compile
sbt compileDocs
sbt test
(I had some issues with some tests, so I'll wait for the CI, but I did check that this worked locally on Windows with sn-vcpkg)sbt scalafmt
On Windows, curl needs to be linked as
libcurl
instead ofcurl
. On top of that, it requirescrypt32
.I'm using a strategy similar to what Scala Native 0.5.0 uses to handle a similar problem with ZLib. See:
https://github.com/scala-native/scala-native/blob/12d57c527d241f6a1781ec9457492cdd6cc4a904/javalib/src/main/scala/scala/scalanative/ffi/zlib.scala#L8-L19
https://github.com/scala-native/scala-native/blob/main/javalib/src/main/scala/scala/scalanative/ffi/package.scala#L7
I was only able to test this on Windows, so please check if nothing is broken in Linux/MacOS.