polars-ocaml
polars-ocaml copied to clipboard
Figure out way to pass OCaml closures to polars
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