No, calling the Erlang function from NIF is not possible. You can implement your functionality in the Erlang function, which is called in a private NIF that returns a value indicating whether to call a callback or you can instead send a message to another process using enif_sendand call the callback function for you.
source
share