Utilizing D libraries in Rust

Hi guys,

There is a D library I'd like to include in my Rust project. The source is accessible on Github (GitHub - CyberShadow/RABCDAsm: Robust ABC (ActionScript Bytecode) [Dis-]Assembler) so custom compilation is possible.
I know about C-ABI, bind-gen, etc but the D ecosystem is completely new for me. To be honest, I'd like to integrate this "the fast way". Sadly I couldn't find existing crates for SWF decompilation.

Is there a step-by-step guide about integrating D into Rust? Googling didn't result in any meaningful information on my end.

Thanks for reading!

I'm not aware of one, but if you can find an FFI guide for D and one for Rust, I think you can put them together.

It looks like it's possible for D to expose functionality to C.

That'll let you compile your D library to a *.so (or *.dll for windows). From there you can write Rust code that links to the library and calls it just like any other native code.

4 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.