polars-ocaml icon indicating copy to clipboard operation
polars-ocaml copied to clipboard

Figure out way to pass OCaml closures to polars

Open mt-caret opened this issue 1 year ago • 0 comments

This is difficult since the functions in polars require 'static lifetimes and AFAICT we can't create a function like this with ocaml_interop's current support for passing OCaml closures to Rust functions. There's also the issue that these functions would probably called on different threads that OCaml doesn't know about, violating the requirement of registering threads with the OCaml runtime. In the meantime, we could do something unsafe and call runtime::recover_handle ourselves to work around the issue as discussed here: https://github.com/tizoc/ocaml-interop/issues/42#issuecomment-1575614559

mt-caret avatar Jun 24 '23 13:06 mt-caret