DLL or SO C/C++ libraries


How can i write FFI interface to kernel32.dll on windows and are there any similar examples for macOS and linux to link a dynamic library in rust ?


It would probably look something like this.


If you are looking for a way to load dynamic libraries yourself I would recommend looking at https://github.com/nagisa/rust_libloading/

I have also built my own create around this called “dynamic reload” https://github.com/emoon/dynamic_reload that allows you to “hot swap” shared objects without leaving the main application but that might not be what you need.