fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Feature Request: WASI 0.2 / Socket Support for WASM Input Plugins

Open xhulia028 opened this issue 5 months ago • 0 comments

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_wasi input.
  • It mentions Rust wasm32-unknown-unknown as a toolchain, but also clearly states that WASM input assumes the WASI ABI, which aligns with wasm32-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 (no std::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-wasip2 or 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!

xhulia028 avatar Jun 05 '25 11:06 xhulia028