Our great sponsors
-
extism
The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
On Windows you'd need to call the LoadLibraryEx method. You'd also need a crate to call Win32 functions, I suggest windows-rs.
Extism - Universal Plugin System w/ WASM
wit-bindgen - Language Binding Generator for WASM Interface Type
There's the abi_stable crate, which provides safe ffi between shared libraries and applications, I also made a simple example (only using the libloading crate), it's as fast as it can be, since there's no extra overhead, but it's not ffi safe and a small change in any of the vtables (traits) can cause segfaults (you can add a version check though)
Most similar - rdylib(very unstable)/cdylib (usable) But there are efforts to create frameworks for building own plugin systems, like this one for example https://github.com/VPlugin/VPlugin
I've made a little library for working with plugins before. It's just a thin wrapper over libloading, making the thing a little bit more safe and convenient. Maybe you'll find it useful. Allows to load dynamic libraries. https://github.com/megahomyak/pluginator
(Also, there's https://github.com/megahomyak/rust_plugin_fuckery, where I experimented with plugin reloading)