This commit is contained in:
Andrea Spacca 2024-07-25 12:20:59 +02:00 committed by GitHub
commit 90e4be8431
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -8,5 +8,7 @@ rust {
targets += target("aarch64-unknown-linux-gnu", "libreqwest.so")
targets += target("x86_64-unknown-linux-gnu", "libreqwest.so")
targets += target("aarch64-apple-darwin", "libreqwest.dylib")
targets += target("x86_64-apple-darwin", "libreqwest.dylib")
targets += target("x86_64-pc-windows-gnu", "libreqwest.dll")
}

View file

@ -26,6 +26,9 @@ public class ReqwestUtils {
} else if (os.contains("linux")) {
extension = ".so";
native_folder = "linux";
} else if (os.contains("darwin")) {
extension = ".dylib";
native_folder = "darwin"; // or apple?
} else {
throw new RuntimeException("OS not supported");
}