Looking for this year's edition? Please visit WASM I/0 2024

Session

Look who's talking!

Detail illustration WASM I/O Detail illustration WASM I/O
Arend van Beelen
blend-mode

fp-bindgen: Full-stack plugins made easy

Arend van Beelen - Fiberplane

Slides

A common use case for WASM is plugins. But setting up the infrastructure for hosting WASM plugins is tedious, and the experience of writing WASM plugins is often far from developer-friendly. fp-bindgen aims to solve these challenges for Rust developers by generating the runtime and plugin bindings.

fp-bindgen is developed as an open-source project: https://github.com/fiberplane/fp-bindgen

It’s goal is to make it as easy as possible to develop full-stack plugins (WASM plugins that can run in both a server-side environment and a browser) for Rust developers. Unlike wit-bindgen (a comparable bindings generator), fp-bindgen is opinionated in that it uses Rust data types as its source of truth for the plugin API. This makes it so that Rust developers don’t need to duplicate their data types to an external schema format. From those Rust data types, it can generate a Rust server runtime, Rust plugin bindings (to be used by plugin authors), and a TypeScript runtime for running the same plugins in the browser.

Another difference between fp-bindgen and wit-bindgen is that fp-bindgen uses Messagepack for serialization, which allows more flexible extension of data types without breaking plugins that use an older version of the plugin API.

View all sessions