Skip to content

WebAssembly plugins #685

Closed
Closed

Description

@Geal

I would like to introduce wasm plugins at these points:

  • main process, for small tasks that can change the configuration (talking to a service discovery, etc)
  • routing filter, deciding on different routes to applications than what the main router would do
  • request and response filters: editing header, body, overriding responses, etc

We can get inspiration from Envoy's wasm filters: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/wasm/v3/wasm.proto

Activity

  1. added this to the 0.14 milestone on Jul 29, 2021
  2. self-assigned this
    on Jul 30, 2021
  3. marc-barry commented on Aug 23, 2024

    @marc-barry

    After using and being part of the Envoy Wasm experiment I'd strongly encourage you to not focus on Wasm middleware but rather dynamic module support so that any language that can be compiled to a shared object can be used.

    As an example, see envoyproxy/envoy#35420. There is an effort underway in Envoy which dates way back to 2017 (envoyproxy/envoy#2053) to add loadable modules. Work is underway to start this with envoyproxy/envoy#35550 and is based on https://github.com/mathetake/envoy-dynamic-modules. The ABI is simple and straightforward and the SDK directory contains examples for both Go and Rust (https://github.com/mathetake/envoy-dynamic-modules/tree/main/source/extensions/dynamic_modules/sdk).

    Going in the direction of loadable modules offers flexibility and simplicity and building a loadable module which brings in a Wasm runtime becomes relatively simple. It also allows for easy customization of the proxy through an extension pattern which means that the proxy can be extended without polluting the codebase with extensions of various quality.

  4. FlorentinDUBOIS commented on May 5, 2026

    @FlorentinDUBOIS
    Collaborator

    Closing as duplicate of #1239 (programmable Rust hooks design proposal). The hook surface is now planned as compile-time-linked Rust rather than WASM, but the original extensibility intent is preserved in the new scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions