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.

1 Like

If you are looking for a way to load dynamic libraries yourself I would recommend looking at GitHub - nagisa/rust_libloading: Bindings around the platform's dynamic library loading primitives with greatly improved memory safety.

I have also built my own create around this called "dynamic reload" GitHub - emoon/dynamic_reload: Dynamic reloading of shared libraries that allows you to "hot swap" shared objects without leaving the main application but that might not be what you need.