WASM Input Plugins
Last updated
Was this helpful?
Last updated
Was this helpful?
(Wasm) is a binary instruction format for stack-based virtual machines.
Fluent Bit supports integration of Wasm plugins built as Wasm/WASI objects for inputs and filter plugins only. The interface for Wasm filter plugins is currently under development but is functional.
There are no additional requirements to execute Wasm plugins.
Fluent Bit supports the following Wasm toolchains:
Rust on wasm32-unknown-unknown
rustc 1.62.1 (e092d0b6b 2022-07-16) or later
on wasm32-wasi
v0.24.0 or later
13 or later
Compile Fluent Bit with Wasm support. For example:
Once compiled, you can see new plugins that handle wasm
. For example:
Wasm input in Fluent Bit assumes WASI ABI, also known as wasm32-wasi
on Rust target and wasm32-wasi
on TinyGo target.
Wasm input plugins execute the function that has a WASI main function entrypoint, and Wasm input plugins in Fluent Bit communicate through stdout on Wasm programs.
Wasm programs should handle stdout for ingesting logs into Fluent Bit.
Once built, a Wasm/WASI program will be available. Then you can execute that built program with the following Fluent Bit configuration:
TinyGo and WASI SDK support Wasm target by default. When using Rust's wasm32-wasi
target, you must install wasm32-wasi
by using . Then, install the target components as:
For an example that handles structured logs, see the .