zach
zach
Thanks for checking! Using pointers only sounds like it would work, I will try it out later today when I get a moment. Is your code available online somewhere?
No problem, that works for me!
Thanks @tizoc for the examples, I started to look at how to port that over to ocaml-rs but unfortunately wasn't able to with the time I had. @Lupus if you...
I realized ocaml-rs also allows parameters of type `&T` (or `&mut T`) when `T: Custom` - I think using this API could potentially limit the lifetime of that value? But...
Awesome, I will take a look! > ocaml-rs is not rooting function arguments by default IIRC I just pushed a commit to the `ocaml5` branch to root arguments by default...
Yeah, in the latest version `FromValue` is implemented for `&T` and `&mut T` where `T: Custom`: https://github.com/zshipko/ocaml-rs/blob/cae584cfd7bab89ac8634f6b50acd27191f8b815/src/custom.rs#L195 They use `Pointer` to do the conversion.
Sure, I think some tests around a single, shared `CompiledPlugin` instance is used to create multiple `Plugin`s in an application with a lot of goroutines would be pretty interesting. `CompiledPlugin`s...
Thanks! The first issue is an easy fix (I just pushed a commit for that one), but the bounds issue is a little more complicated. The `ToValue` macro is a...
It's likely not too hard of problem to solve, but macros in Rust are hard to debug. I think I'll be able to get it to match the expected behavior...
Interesting! I don't have an immediate answer but am not surprised that ocaml-rs has additional overhead. I would guess it's probably related to the fact that `ocaml::Value` is rooted using...