tustvold commented on code in PR #7226:
URL: https://github.com/apache/arrow-rs/pull/7226#discussion_r1977635615


##########
object_store/src/client/connection.rs:
##########
@@ -227,11 +233,37 @@ pub trait HttpConnector: std::fmt::Debug + Send + Sync + 
'static {
 /// [`HttpConnector`] using [`reqwest::Client`]
 #[derive(Debug, Default)]
 #[allow(missing_copy_implementations)]
+#[cfg(not(target_arch = "wasm32"))]
 pub struct ReqwestConnector {}
 
+#[cfg(not(target_arch = "wasm32"))]
 impl HttpConnector for ReqwestConnector {
     fn connect(&self, options: &ClientOptions) -> crate::Result<HttpClient> {
         let client = options.client()?;
         Ok(HttpClient::new(client))
     }
 }
+
+#[cfg(target_arch = "wasm32")]
+pub(crate) fn http_connector(
+    custom: Option<Arc<dyn HttpConnector>>,
+) -> crate::Result<Arc<dyn HttpConnector>> {
+    match custom {
+        Some(x) => Ok(x),
+        None => Err(crate::Error::NotSupported {
+            source: "WASM32 architectures must provide an HTTPConnector"

Review Comment:
   I think it would be good to even go as far as providing first-party support, 
but I don't have time to figure out the complexities involved.
   
   https://github.com/apache/arrow-rs/issues/7227 is my attempt to fish for 
contributions



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to