duck-read-cache-fs icon indicating copy to clipboard operation
duck-read-cache-fs copied to clipboard

Add to duckdb WASM build?

Open dobesv opened this issue 9 months ago • 6 comments

Is your feature request related to a problem? Please describe.

This seems like it could be very useful for in-browser use cases. From my little research it seems like browser support for caching partial reads is not great.

Describe the solution you'd like

Be great if I could open the duckdb WASM console, and install and load the extension, and it would do its caching magic to speed up queries.

See DuckDB WASM Page for more about how DuckDB WASM is used to run DuckDB in the browser.

dobesv avatar Mar 25 '25 03:03 dobesv

Hi @dobesv , thank you for the feedback!

At the moment, we only focus on linux and macos, because we two (@douenergy and I) only have mac/linux access. We are seriously considering adding windows/wasm support now since there're already a few users asks.

Will keep you posted! Stay in touch, and feel free to leave comments and feature requests!

dentiny avatar Mar 25 '25 10:03 dentiny

Hi, just to be clear, WASM is not a Windows thing. It's what is used to run duckdb in the browser.

See https://duckdb.org/docs/stable/clients/wasm/overview.html

dobesv avatar Mar 27 '25 18:03 dobesv

Hi, just to be clear, WASM is not a Windows thing. It's what is used to run duckdb in the browser.

See https://duckdb.org/docs/stable/clients/wasm/overview.html

Thanks for the clarification and apologize for the confusion. I put these two items together because there're feature requests for windows platform also. We will checkout how hard it is to setup WASM.

dentiny avatar Mar 27 '25 18:03 dentiny

Hopefully there's an example to follow in the duckdb main repo build scripts how they built the core extensions using emscripten that you can easily follow 🤞🏻

dobesv avatar Mar 27 '25 18:03 dobesv

@dobesv Thanks for the interesting. WASM is a very exciting technology, but if we want to persist the cache like we do in non-WASM builds, we need to make sure OPFS works properly with our extension. If we find a way, we will definitely let you know.

douenergy avatar Mar 28 '25 01:03 douenergy

It looks like in the WASM build they had to customize the httpfs stuff a lot, so this might not be as simple as I initially thought unfortunately.

dobesv avatar Apr 10 '25 19:04 dobesv