You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is split in an Elixir part (which contains some Rust NIFs) and a Rust part (which can be included in your own Rust NIFs).
However, it turns out that when we pass a ManualFuture from one of these to the other, an argument error is raised.
Why? My best guess is that the code inside the rustler_elixir_fun Rust crate is active twice: Once statically compiled into your NIF, and once dynamically as part of 'our' NIF.
And when we register a resource, one of these two definitions will win, resulting in badarg errors when passing it to NIF functions of the other.
This is a problem for fill_future.
The only way forward I currently envision is to force people to implement/call this themselves from their own module.
This would mean a change to all Rust and Elixir code, as we'll have to pass which NIF needs to be called afterwards through the whole stack. 😞
I'm still looking for alternatives for the time being.
The text was updated successfully, but these errors were encountered:
This library is split in an Elixir part (which contains some Rust NIFs) and a Rust part (which can be included in your own Rust NIFs).
However, it turns out that when we pass a
ManualFuture
from one of these to the other, an argument error is raised.Why? My best guess is that the code inside the
rustler_elixir_fun
Rust crate is active twice: Once statically compiled into your NIF, and once dynamically as part of 'our' NIF.And when we register a resource, one of these two definitions will win, resulting in badarg errors when passing it to NIF functions of the other.
This is a problem for
fill_future
.The only way forward I currently envision is to force people to implement/call this themselves from their own module.
This would mean a change to all Rust and Elixir code, as we'll have to pass which NIF needs to be called afterwards through the whole stack. 😞
I'm still looking for alternatives for the time being.
The text was updated successfully, but these errors were encountered: