How feasible is to create a WASM plugin system in Rust?

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

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

  • take a look at the docs & github if you're interested: https://extism.org & https://github.com/extism/extism

  • wasmi

    WebAssembly (Wasm) interpreter.

  • There are lots of solutions to this, I was randomly looking into this yesterday purely out of curiosity and it looks to me like wasmi is the current go-to option.

  • 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
  • fp-bindgen

    Bindings generator for full-stack WASM plugins

  • fp-bindgen is a library that can help you if you to write custom plugin APIs for such a use case: https://github.com/fiberplane/fp-bindgen

  • Ambient

    The multiplayer game engine

  • Yes. I implemented the WASM logic for Ambient. It's all doable, but as the other commenters have mentioned, bindings can be a bit of a pain.

  • trinity

    Matrix bots in Rust and WebAssembly (by bnjbvr)

  • Here's another example: https://github.com/bnjbvr/trinity

  • wasmloading

  • I wrote a toy example of this a few years ago. It's probably a little outdated, but it's also probably a little easier to get your head around than reading a full-fledged plugin system in something like lapce: https://github.com/pmsanford/wasmloading

  • wasmtime_serde

    Simple library for serializing complex types to the wasmtime runtime using serde

  • yes, it's perfectly possible, the biggest hurdle to this is that you need some way to map the data into and out of wasm memory, you can do this manually or use one of the crates that currently solve this problem (I'm author of a github)

  • 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