From 2cfb4d92474369a096d2d265ae4a28aba6e0ba1c Mon Sep 17 00:00:00 2001 From: Alexander Walter Date: Fri, 9 Feb 2024 12:43:23 +0100 Subject: [PATCH 1/2] Allow to choose rustls-tls for reqwest instead of openssl --- Cargo.toml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f11cd87..a2fad08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,10 @@ documentation = "https://docs.rs/arloader/latest/arloader/" keywords = ["arweave", "nft", "metaplex", "solana", "upload"] categories = ["api-bindings", "command-line-utilities", "filesystem"] +[features] +default = ["reqwest/default-tls"] +rustls-tls = ["reqwest/rustls-tls"] + [lib] name = "arloader" path = "src/lib.rs" @@ -32,25 +36,31 @@ env_logger = "0.9.0" futures = "0.3.17" glob = "0.3.0" infer = { version = "0.7.0", default-features = false } -jsonwebkey = { version = "0.3.4", features = [ "pkcs-convert" ] } +jsonwebkey = { version = "0.3.4", features = ["pkcs-convert"] } log = "0.4.14" matches = "0.1.9" mime_guess = "2.0.3" -num-bigint = { version = "0.4.2", features = [ "serde" ] } +num-bigint = { version = "0.4.2", features = ["serde"] } num-traits = "0.2.14" rayon = "1.5.1" -ring = {version = "0.16.20", features = [ "std" ] } -reqwest = { version = "0.11", features = ["json"] } +ring = { version = "0.16.20", features = ["std"] } +reqwest = { version = "0.11", optional = true, default-features = false, features = [ + "json", +] } serde = "1.0.130" serde_derive = "1.0.130" serde_json = { version = "1.0.68", features = ["preserve_order"] } solana-sdk = "1.8.2" thiserror = "1.0.30" -tokio = { version = "1", features = ["rt-multi-thread", "fs", "macros", ] } +tokio = { version = "1", features = ["rt-multi-thread", "fs", "macros"] } url = "2.2.2" [dev-dependencies] -criterion = { version = "0.3", features = ["async_futures", "async_tokio", "html_reports"] } +criterion = { version = "0.3", features = [ + "async_futures", + "async_tokio", + "html_reports", +] } image = "0.23.14" imageproc = "0.22.0" num-complex = "0.4.0" From 6253bc8018942a139523ca74b0a97dd68d78404f Mon Sep 17 00:00:00 2001 From: Alexander Walter Date: Fri, 9 Feb 2024 12:46:19 +0100 Subject: [PATCH 2/2] Adapt to existing formatting --- Cargo.toml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a2fad08..3704e8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,31 +36,25 @@ env_logger = "0.9.0" futures = "0.3.17" glob = "0.3.0" infer = { version = "0.7.0", default-features = false } -jsonwebkey = { version = "0.3.4", features = ["pkcs-convert"] } +jsonwebkey = { version = "0.3.4", features = [ "pkcs-convert" ] } log = "0.4.14" matches = "0.1.9" mime_guess = "2.0.3" -num-bigint = { version = "0.4.2", features = ["serde"] } +num-bigint = { version = "0.4.2", features = [ "serde" ] } num-traits = "0.2.14" rayon = "1.5.1" -ring = { version = "0.16.20", features = ["std"] } -reqwest = { version = "0.11", optional = true, default-features = false, features = [ - "json", -] } +ring = {version = "0.16.20", features = [ "std" ] } +reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] } serde = "1.0.130" serde_derive = "1.0.130" serde_json = { version = "1.0.68", features = ["preserve_order"] } solana-sdk = "1.8.2" thiserror = "1.0.30" -tokio = { version = "1", features = ["rt-multi-thread", "fs", "macros"] } +tokio = { version = "1", features = ["rt-multi-thread", "fs", "macros", ] } url = "2.2.2" [dev-dependencies] -criterion = { version = "0.3", features = [ - "async_futures", - "async_tokio", - "html_reports", -] } +criterion = { version = "0.3", features = ["async_futures", "async_tokio", "html_reports"] } image = "0.23.14" imageproc = "0.22.0" num-complex = "0.4.0"