You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EPIC] A collection of tickets for improved WASM support in DataFusion #13815
changed the title [-][EPIC] A collection of tickets for supporting WASM in DataFusion[/-][+][EPIC] A collection of tickets for improved WASM support in DataFusion[/+]on Dec 17, 2024
I’m very interested in contributing to the WASM support for DataFusion project as part of GSoC 2025. Enhancing embeddability and ensuring robust WASM integration aligns with my passion for building reliable and maintainable software. I’d greatly appreciate it if you could share more details on the project’s current challenges and key milestones. Understanding these aspects will help me prepare a thoughtful and well-structured proposal.
I’m very interested in contributing to the WASM support for DataFusion project as part of GSoC 2025. Enhancing embeddability and ensuring robust WASM integration aligns with my passion for building reliable and maintainable software
Stretch goal -- prototype how we would support WASM user defined functions
On this point, I was able to get WASM UDFs working in dft (im sure there is room for improvement but i got both WASM Native and Arrow IPC formats working) and as part of the next release I was planning to publish that crate so others could use it. @savaliyabhargav I would be happy to collaborate on that if you are interested in it.
For the WASM UDFs they just need some more real world testing / benchmarking. To be honest, the other points @alamb mentioned would probably better benefit the DataFusion ecosystem at this stage. But, if WASM UDFs are what interest you then you could make an issue on the dft repo and we could discuss some tangible next steps for that.
Hi, I'm also interested in working on this project for Gsoc 2025. I'm currently a master student at Georgia Institute of Technology, I had some experiences with WASM and Rust in my undergrad study, and I would like to see how that can be incorporated with DataFusion!
Are there any prerequisite for this project? I suppose the points below would be the key points for our proposal, right?
I suggest some key milestones:
Write a blog post explaining what WASM is, why it is important, and how to use DataFusion with it
Add example / section to the documentation about compiling and building with WASM
Make several example WASM apps with DataFusion -- for example #13818
Stretch goal -- prototype how we would support WASM user defined functions
I'm new to DataFusion but I've heard of the name for a long long time.
Can you please give me some relative materials to look at for this project? or working on some "good first issue" should be enough for me to get familiar with DataFusion?
Can you please give me some guidance on how to work on an precise and appropriate proposal?
My approach boils down to having the wasm module expose a _malloc function which is then used to reserve space for the Arrow pointers' data. I've adjusted some of the code from the arrow::ffi module to allow the copying of Arrays + Schema over the FFI boundary. It's not the greatest considering there are multiple calls to _malloc (that might be able to be done once in a similar fashion to arena allocation?), multiple copies to the wasm modules' data and that alignment is different (wasm usually is 32 whilst my machine is 64).
datafusion54 regresses pretty far on wasm support, with default features requiring zstd and thus full Emscripten to compile. 53.1 is the last version that it's reasonably possible to use with wasm
datafusion54 regresses pretty far on wasm support, with default features requiring zstd and thus full Emscripten to compile. 53.1 is the last version that it's reasonably possible to use with wasm
@logankaser can you please provide a reproducer for this?
Activity
[-][EPIC] A collection of tickets for supporting WASM in DataFusion[/-][+][EPIC] A collection of tickets for improved WASM support in DataFusion[/+]savaliyabhargav commentedon Mar 14, 2025
Dear @alamb ,
I hope you’re doing well.
I’m very interested in contributing to the WASM support for DataFusion project as part of GSoC 2025. Enhancing embeddability and ensuring robust WASM integration aligns with my passion for building reliable and maintainable software. I’d greatly appreciate it if you could share more details on the project’s current challenges and key milestones. Understanding these aspects will help me prepare a thoughtful and well-structured proposal.
Thank you for your time and guidance.
Best regards,
bhargav
alamb commentedon Mar 17, 2025
Thank you @savaliyabhargav
I think the key challenge is the same as in this ticket's description:
I suggest some key milestones:
matthewmturner commentedon Mar 17, 2025
On this point, I was able to get WASM UDFs working in dft (im sure there is room for improvement but i got both WASM Native and Arrow IPC formats working) and as part of the next release I was planning to publish that crate so others could use it. @savaliyabhargav I would be happy to collaborate on that if you are interested in it.
savaliyabhargav commentedon Mar 18, 2025
@matthewmturner yes sure i am interested can you please give me more detail about it
matthewmturner commentedon Mar 19, 2025
For the WASM UDFs they just need some more real world testing / benchmarking. To be honest, the other points @alamb mentioned would probably better benefit the DataFusion ecosystem at this stage. But, if WASM UDFs are what interest you then you could make an issue on the dft repo and we could discuss some tangible next steps for that.
qstommyshu commentedon Mar 19, 2025
Hi, I'm also interested in working on this project for Gsoc 2025. I'm currently a master student at Georgia Institute of Technology, I had some experiences with WASM and Rust in my undergrad study, and I would like to see how that can be incorporated with DataFusion!
Are there any prerequisite for this project? I suppose the points below would be the key points for our proposal, right?
I'm new to DataFusion but I've heard of the name for a long long time.
Thanks in advance!
savaliyabhargav commentedon Mar 20, 2025
@matthewmturner Please provide me with some information on DFT so that I can learn and work on your project effectively
ilikepi63 commentedon May 26, 2025
Hello 👋
Not sure if this is the correct place, but I've been working on a very rough implementation of using Arrow in Wasmtime here: https://github.com/ilikepi63/arrow_wasmtime.
My approach boils down to having the wasm module expose a _malloc function which is then used to reserve space for the Arrow pointers' data. I've adjusted some of the code from the arrow::ffi module to allow the copying of Arrays + Schema over the FFI boundary. It's not the greatest considering there are multiple calls to _malloc (that might be able to be done once in a similar fashion to arena allocation?), multiple copies to the wasm modules' data and that alignment is different (wasm usually is 32 whilst my machine is 64).
For a simple example of doing this, please see here: https://github.com/ilikepi63/arrow_wasmtime/blob/main/tests/simple_addition.rs (you'll need to cargo build the example_wasm function)
logankaser commentedon Jul 10, 2026
datafusion54regresses pretty far on wasm support, with default features requiring zstd and thus full Emscripten to compile.53.1is the last version that it's reasonably possible to use with wasmkylebarron commentedon Jul 10, 2026
Is it only the inclusion of the feature as default that changed? Did you try opting-in manually to specific features and excluding zstd?
FWIW in other projects (e.g. parquet) I've been able to compile zstd to
wasm32-unknown-unknownwithout any issue. If you're on macos you need to switch the clang you use to compile.alamb commentedon Jul 10, 2026
@logankaser can you please provide a reproducer for this?
We have a wasm test module https://github.com/apache/datafusion/tree/main/datafusion/wasmtest precisely designed to ensure DataFusion can be compiled under wasm. If it lacking coverage I think we should fix it.
perf: reduce invariant-check code generation (apache#25073)