What in Rust is equivalent to C++ DLLs (shared libraries), or what do I need to do to support extensions in my app?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • windows-rs

    Rust for Windows

  • 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

    The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.

  • Extism - Universal Plugin System w/ WASM

  • 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.

    InfluxDB logo
  • wit-bindgen

    A language binding generator for WebAssembly interface types

  • wit-bindgen - Language Binding Generator for WASM Interface Type

  • rust-plugin-system

    trying to make a "simple" plugin system in rust

  • 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)

  • VPlugin

    Discontinued Discontinued, please do not use.

  • 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

  • pluginator

    Rust plugins made easier

  • 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

  • rust_plugin_fuckery

    Experimenting with plugins in Rust

  • (Also, there's https://github.com/megahomyak/rust_plugin_fuckery, where I experimented with plugin reloading)

  • 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.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts