camel-wit 0.9.0

WIT interface definitions for rust-camel WASM plugins
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package camel:plugin;

/// Guest bean plugin with multi-method dispatch.
///
/// Beans declare their methods via `methods()` and handle invocations
/// via `invoke(method, exchange)`. The host calls `init()` once at
/// registration and `invoke()` for each route step that targets this bean.
world bean {
    import host;
    use types.{wasm-exchange, wasm-error};

    export invoke: func(method: string, exchange: wasm-exchange) -> result<wasm-exchange, wasm-error>;
    export methods: func() -> list<string>;
    export init: func() -> result<_, string>;
}