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


##########
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:
   At some point it would be great to have an example of implementing WASM / a 
documentation guide for how to do it



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to