Open sgreenbury opened 4 months ago
wasm
and not_wasm
features that optionally include these features.parquet
that also includes multiple compression features with lz4
not compiling to WASM. A workaround is to point to a fork of polars with compression features included in the parquet feature that can compile to WASM.
scan_parquet
call here appears to require "http"/"streaming". An alternative that is compatible with WASM features and ideally can efficiently only do an http request for the columns required from the metrics, the needs to be implemented and testedwasm32-unknown-unknown
with wasm
featuresIn case it's helpful, https://crates.io/crates/streaming-http-range-client and https://github.com/michaelkirk/geomedea/tree/main/geomedea-wasm might be helpful to figure out how to do streaming HTTP range requests in WASM. And if you want to chat about this stuff, join the georust Discord https://discord.gg/Fp2aape and ping Michael and Kyle
Thanks @dabreegster for the helpful suggestions! polars also has an implementation (though currently this cannot used directly with WASM since the "cloud" feature depends on a multi-threaded tokio runtime) that might be useful for understanding how to construct the required range requests and convert to a polars dataframe.
I've added a functional WASM implementation for getting the metrics so that it does not block popgetter-browser but this does not have a range request for subsets of columns/rows yet https://github.com/Urban-Analytics-Technology-Platform/popgetter-cli/pull/76
Next steps from discussion @stuartlynn @sgreenbury @andrewphilipsmith:
See 153 for an alternative approach without "parquet" feature.
wasm
specific build forpolars
wasm
specific build forpopgetter
corewasm
specific implementations inpopgetter
core (or potentially apopgetter-wasm
). Features that may need to be updated: