Skip to main content

camel_component_wasm/
source_bindings.rs

1// Async bindings.
2//
3// The source world's `run` export and `accept-http`/`submit-exchange` imports
4// are async. The guest runs as a tokio task driving `run` (via
5// `store.run_concurrent`); host imports receive an `&Accessor`
6// (HostWithStore) and use async channel ops (`.recv().await`/`.send().await`).
7// `is-cancelled` stays sync (a `with` peek that must not yield). See
8// docs/superpowers/specs/2026-07-08-wasm-source-async-stream-design.md.
9wasmtime::component::bindgen!({
10    path: "wit",
11    world: "source",
12    with: {
13        "camel:plugin/source-host.http-listener": crate::source_host::HttpListenerHandle,
14    },
15});