arrow-js-ffi icon indicating copy to clipboard operation
arrow-js-ffi copied to clipboard

Can this library be used with Flechette?

Open domoritz opened this issue 3 months ago • 3 comments

https://github.com/uwdata/flechette is a lightweight alternative to Arrow JS. It would be cool to be able to choose between Arrow JS and Flechette (or really any other future implementation of Arrow in JS).

domoritz avatar Sep 17 '25 17:09 domoritz

Not today, no. It's very tied to arrow-js because there's no intermediate representation. Values are read directly from Wasm memory into arrow-js objects.

We could create an intermediate representation for the C data and C schema pointer structs, and then have modules to load either into arrow-js or flechette. It would still be a decent amount of duplication for the API integration, but that's unavoidable.

I could point you to where we could make progress on this if you'd like, though I probably won't have time to implement it myself.

kylebarron avatar Sep 17 '25 20:09 kylebarron

Thanks for the explanation. I don't have cycles at the moment but if it was easy, I'd built a parquet loader to Vega with it similar to https://github.com/vega/vega-loader-arrow. I can also just us the arrow js dependency of course and it should just work.

domoritz avatar Sep 17 '25 20:09 domoritz

I figure the constructor APIs are pretty similar, so you should essentially be able to copy-paste and replace the arrow-js constructors with their flechette constructors; it'll just be a little verbose.

kylebarron avatar Sep 17 '25 21:09 kylebarron