There was a bug in Dinvoke_rs 0.2.1 that could trigger stack overflow errors in some environments. Fixed by upgrading to version 0.2.2.