> Using D code in Rust probably will be much more painful and I am not sure if it can be done 100% safely...
Can you elaborate? Saying it will be "much more painful" without anything further is not especially helpful. I've added D functions to C programs more or less trivially, including compiling to a shared library, with no change to the code.