wasmtime_wasi_http/p3/
bindings.rs

1//! Raw bindings to the `wasi:http` package.
2
3#[expect(missing_docs, reason = "generated code")]
4mod generated {
5    wasmtime::component::bindgen!({
6        path: "src/p3/wit",
7        world: "wasi:http/proxy",
8        imports: {
9            "wasi:http/handler/[async]handle": async | store | trappable | tracing,
10            "wasi:http/types/[drop]request": store | trappable | tracing,
11            "wasi:http/types/[drop]response": store | trappable | tracing,
12            "wasi:http/types/[static]request.consume-body": async | store | trappable | tracing,
13            "wasi:http/types/[static]request.new": async | store | trappable | tracing,
14            "wasi:http/types/[static]response.consume-body": async | store | trappable | tracing,
15            "wasi:http/types/[static]response.new": async | store | trappable | tracing,
16            default: trappable | tracing,
17        },
18        exports: { default: async | store | task_exit },
19        with: {
20            "wasi:http/types/fields": with::Fields,
21            "wasi:http/types/request": crate::p3::Request,
22            "wasi:http/types/request-options": with::RequestOptions,
23            "wasi:http/types/response": crate::p3::Response,
24        },
25        trappable_error_type: {
26            "wasi:http/types/error-code" => crate::p3::HttpError,
27            "wasi:http/types/header-error" => crate::p3::HeaderError,
28            "wasi:http/types/request-options-error" => crate::p3::RequestOptionsError,
29        },
30    });
31
32    mod with {
33        pub type Fields = crate::p3::MaybeMutable<http::HeaderMap>;
34        pub type RequestOptions = crate::p3::MaybeMutable<crate::p3::RequestOptions>;
35    }
36}
37
38pub use self::generated::wasi::*;
39
40/// Raw bindings to the `wasi:http/proxy` exports.
41pub use self::generated::exports;
42
43/// Bindings to the `wasi:http/proxy` world.
44pub use self::generated::{Proxy, ProxyIndices, ProxyPre};