-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
object-store fails to compile for wasm32-unknown-unknown
with http
feature
#4776
Comments
This may just be documentation ommission, last time I tried the underlying HTTP client didn't support WASI (IIRC due to lack of tokio support). If this is no longer the case, we can probably support the full feature set, as the cloud features require little more than an http client as well |
Do you need full tokio support? Some http libraries, e.g. |
Quite probably not, but I've been unable to find the magic combination of feature flags, etc... to make this work. I would be more than happy to review PRs adding support for this, but do not personally intend to spend more time playing with this |
|
For time being, I've created an object_store implementation for s3 that works in wasm. (https://github.com/JanKaul/object_store_s3_wasm) If you are intrested |
Interesting, I think the big thing that currently blocks supporting this first-party is that whilst reqwest does have a WASM32 client, it is effectively a completely independent API, with many methods we rely on missing, and more problematically no Send bounds on the returned futures. I think it would be very cool if we could somehow decouple object_store from reqwest and allow use-provided HTTP clients, but I suspect this might be a fairly involved process |
There already seems to be a discussion about this in the reqwest crate (seanmonstar/reqwest#1977). But this also seems like it's not happening any time soon. |
Describe the bug
object-store crate fails to compile for wasm32 with the
http
feature.There are a ton of errors. Some unresolved imports, some
future is not `Send`
, etc.To Reproduce
Expected behavior
Expected the crate to build with the
http
feature. The readme indicates that the aws, azure, and gcp features don't work in wasm, but I was hoping the http feature would.Additional context
I have a wasm-bindgen library to read Parquet in WebAssembly and return an Arrow table to JavaScript: https://github.com/kylebarron/parquet-wasm. I have an existing implementation working using a
RangedAsyncReader
from https://github.com/DataEngineeringLabs/ranged-reader-rs but I was trying to test out the object store reader implementation to see if it would coalesce requests better. Right now I'm seeing a bunch of requests per row group, and especially from the browser coalescing requests is a high priority. See e.g. https://observablehq.com/d/f5723cea6661fb71, where I'm seeing 33 content requests for a parquet file with 7 row groups using thearrow-rs
implementation. (For context, with theparquet2
implementation it appeared to make a separate request for each and every array in every row group)The text was updated successfully, but these errors were encountered: