fluent-bit
fluent-bit copied to clipboard
Feature Request: WASI 0.2 / Socket Support for WASM Input Plugins
Hi Fluent Bit team,
I'm working on a custom WASM input plugin for Fluent Bit, and I'd like to use it to fetch logs from an HTTP API endpoint (e.g., scrape metrics, ingest structured JSON from a service).
Background
From the current documentation:
- Fluent Bit supports Wasm input plugins via the
exec_wasiinput. - It mentions Rust
wasm32-unknown-unknownas a toolchain, but also clearly states that WASM input assumes the WASI ABI, which aligns withwasm32-wasi. - However, WASI 0.1, used by
wasm32-wasi, does not support sockets or networking, which prevents plugins from fetching from HTTP endpoints.
Context
In Rust:
wasm32-wasi(WASI 0.1) does not support networking (nostd::net,reqwest, etc.)wasm32-wasip2(WASI 0.2) does support sockets, and is now Tier 2 stable as of Rust 1.82.- Fluent Bit does not currently mention
wasm32-wasip2or support for WASI 0.2.
###Question
Are there any plans to support WASI 0.2 (wasm32-wasip2) in future versions of Fluent Bit?
If not, is there an alternative approach for creating a custom plugin that performs HTTP requests dynamically?
Thanks for the amazing work on Fluent Bit!