duckdb-prql icon indicating copy to clipboard operation
duckdb-prql copied to clipboard

WASM extension

Open maelp opened this issue 1 year ago • 3 comments

Very nice work, would it be possible to create a WASM extension to use it in duckdb-wasm?

maelp avatar Jan 25 '24 16:01 maelp

I had experimented with this a couple of weeks ago, but ran into trouble compiling the code with emscripten. The PRQL compiler that I'm embedding in this DuckDB C++ extension is written in Rust, and the WASM compilation toolchain was running into linker issues when (statically) linking some Rust libraries.

I will give it another look, as I agree that this would be a great feature to have.

ywelsch avatar Jan 25 '24 20:01 ywelsch

(@ywelsch if there's anything we can do to make this easier on the PRQL side, let us know!)

max-sixty avatar Jan 25 '24 21:01 max-sixty

FYI, prqlc-r supports be compiled to the emscripten target with like this: https://github.com/PRQL/prqlc-r/blob/0c162fe3a30de791a44c110514f7d83f5c91a9d3/src/Makevars.in#L35-L44

However, it cannot be built with the recent nightly toolchain due to an outdated dependency crate (PRQL/prqlc-r#261).

eitsupi avatar May 08 '24 02:05 eitsupi