[
https://issues.apache.org/jira/browse/ARROW-17608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626667#comment-17626667
]
Kyle Barron commented on ARROW-17608:
-------------------------------------
I don't think I have the bandwidth right now to push this to completion. Would
you be interested in a PR even if not every data type is supported? For example
I hit issues with arrow JS [misinterpreting a fixed size
list|https://github.com/kylebarron/arrow-js-ffi/pull/12] (the error is probably
on my side).
[~changhiskhan] If you're using a jupyter notebook with normal Python, I don't
think this will help you at all, and using Arrow IPC would still be easiest. If
you're using jupyterlite within webassembly, this would allow you to have
read-only views in Arrow JS from Python's Wasm memory without a copy. pyodide
has a [PyBuffer
class|https://pyodide.org/en/stable/usage/api/js-api.html#pyodide.PyBuffer]
which lets JS access Python memory, so you should in theory be able to export C
Data Interface structs to those buffers, which should point to the arrow memory
locations in the wasm memory.
> [JS] Implement C Data Interface
> -------------------------------
>
> Key: ARROW-17608
> URL: https://issues.apache.org/jira/browse/ARROW-17608
> Project: Apache Arrow
> Issue Type: New Feature
> Components: JavaScript
> Reporter: Kyle Barron
> Priority: Major
>
> I've recently been working on an implementation of the C Data Interface for
> Arrow JS, the idea being that Arrow JS can read memory from WebAssembly this
> way without a copy ([blog
> post|https://observablehq.com/@kylebarron/zero-copy-apache-arrow-with-webassembly],
> [repo|https://github.com/kylebarron/arrow-js-ffi]). Dominik
> [suggested|https://twitter.com/domoritz/status/1562670919469842432?s=20&t=Ts8HQe_fzgRmecUP1Qrhrw]
> starting a discussion about potentially adding this into Arrow JS.
> My implementation is still WIP but figure it's not too early to start a
> discussion. A couple notes:
> - I'm focused only on reading FFI memory, so I only have parsing code. I
> figure writing doesn't really make sense in JS since Wasm can't access
> arbitrary JS memory
> - In order to generate FFI memory in the tests, I'm using a small Rust module
> to convert from an IPC table. If we didn't want to add a rust build step in
> the tests, that module could be published to NPM
> Thoughts?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)