Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing to FFI structs #42

Open
kylebarron opened this issue Aug 30, 2023 · 0 comments
Open

Writing to FFI structs #42

kylebarron opened this issue Aug 30, 2023 · 0 comments

Comments

@kylebarron
Copy link
Owner

I think it makes sense to explore writing to Wasm memory.

  • writeField(field: arrow.Field, malloc: (length: Number) -> Number): Number would take a field and a malloc function. It would write the field manually into wasm memory using malloc, and at the end returning the pointer to the written number struct.
  • Requires a memory copy, but still that's better than going through IPC, which requires a single memory buffer.

A good reference here, esp in relation to Rust is Matu Radei's great blog post: https://radu-matei.com/blog/practical-guide-to-wasm-memory/#passing-arrays-to-rust-webassembly-modules

@kylebarron kylebarron mentioned this issue Sep 1, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant