Skip to content

Support WebAssembly (WASM) in Envoy #4272

@louiscryan

Description

@louiscryan

Title: Support WebAssembly (WASM) in Envoy

Description:
WebAssembly [1] provides an embeddable and safe execution environment for platform extensions. While primarily intended for the Web browsers the WASM community is also supportive of [1] other embeddings. WASM is now supported by the major browser vendors and has significant development momentum behind it. In comparison with LuaJit it has the advantage of institutional support and perhaps more interestingly a compiler toolchain that works with many popular languages C/C++, Rust, Golang, Typescript (AssemblyScript [3]) etc.

There are clearly many use-cases for embedding in Envoy, from simple HTTP header customization to custom protocol handlers. We've had quite a bit of experience building C++ extensions to Envoy as part of Istio and I think many if not all of them could easily target a WASM runtime instead and as such we are willing to contribute to building this out.

I've chatted with the v8 team and this is something they're interested in supporting too but they need some time to make the component more separable. Perhaps as a first prototype using something like the wabt [4] interpreter would make sense but suggestions welcome

Relevant Links
[1] https://webassembly.org/
[2] https://webassembly.org/docs/non-web/
[3] https://github.com/AssemblyScript/assemblyscript
[4] https://github.com/WebAssembly/wabt#running-wasm-interp

@htuch @lizan @rshriram

Metadata

Metadata

Labels

area/wasmenhancementFeature requests. Not bugs or questions.no stalebotDisables stalebot from closing an issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions