Skip to main content

capsule_runtime/
bindings.rs

1pub mod host {
2    wasmtime::component::bindgen!({
3        path: "wit/host",
4        world: "runtime-host",
5        additional_derives: [serde::Serialize, serde::Deserialize],
6    });
7}
8
9/// The host side of the `tool` world's `murmur:process/process` import, served to every WASM
10/// tool's store by `invoke_tool_component` through [`crate::session_process`].
11pub mod tool_host {
12    wasmtime::component::bindgen!({
13        path: "wit/host",
14        world: "tool-host",
15        imports: { default: async },
16        additional_derives: [serde::Serialize, serde::Deserialize],
17        with: {
18            "murmur:process/process.connection": crate::session_process::Connection,
19        },
20    });
21}
22
23pub mod hook {
24    wasmtime::component::bindgen!({
25        path: "wit/hook",
26        world: "hook",
27        additional_derives: [serde::Serialize, serde::Deserialize],
28    });
29}
30
31pub mod process_driver {
32    wasmtime::component::bindgen!({
33        path: "wit/process-driver",
34        world: "process-driver",
35        exports: { default: async },
36        additional_derives: [serde::Serialize, serde::Deserialize],
37    });
38}