Path: blob/main/crates/wasi-http/src/bindings.rs
1692 views
//! Raw bindings to the `wasi:http` package.12#[expect(missing_docs, reason = "bindgen-generated code")]3mod generated {4use crate::body;5use crate::types;67wasmtime::component::bindgen!({8path: "wit",9world: "wasi:http/proxy",10imports: { default: tracing | trappable },11exports: { default: async },12require_store_data_send: true,13with: {14// Upstream package dependencies15"wasi:io": wasmtime_wasi::p2::bindings::io,1617// Configure all WIT http resources to be defined types in this18// crate to use the `ResourceTable` helper methods.19"wasi:http/types/outgoing-body": body::HostOutgoingBody,20"wasi:http/types/future-incoming-response": types::HostFutureIncomingResponse,21"wasi:http/types/outgoing-response": types::HostOutgoingResponse,22"wasi:http/types/future-trailers": body::HostFutureTrailers,23"wasi:http/types/incoming-body": body::HostIncomingBody,24"wasi:http/types/incoming-response": types::HostIncomingResponse,25"wasi:http/types/response-outparam": types::HostResponseOutparam,26"wasi:http/types/outgoing-request": types::HostOutgoingRequest,27"wasi:http/types/incoming-request": types::HostIncomingRequest,28"wasi:http/types/fields": types::HostFields,29"wasi:http/types/request-options": types::HostRequestOptions,30},31trappable_error_type: {32"wasi:http/types/error-code" => crate::HttpError,33},34});35}3637pub use self::generated::wasi::*;3839/// Raw bindings to the `wasi:http/proxy` exports.40pub use self::generated::exports;4142/// Bindings to the `wasi:http/proxy` world.43pub use self::generated::{LinkOptions, Proxy, ProxyIndices, ProxyPre};4445/// Sync implementation of the `wasi:http/proxy` world.46pub mod sync {47#[expect(missing_docs, reason = "bindgen-generated code")]48mod generated {49wasmtime::component::bindgen!({50world: "wasi:http/proxy",51imports: { default: tracing },52with: {53// http is in this crate54"wasi:http": crate::bindings::http,55// sync requires the wrapper in the wasmtime_wasi crate, in56// order to have in_tokio57"wasi:io": wasmtime_wasi::p2::bindings::sync::io,58},59require_store_data_send: true,60});61}6263pub use self::generated::wasi::*;6465/// Raw bindings to the `wasi:http/proxy` exports.66pub use self::generated::exports;6768/// Bindings to the `wasi:http/proxy` world.69pub use self::generated::{Proxy, ProxyIndices, ProxyPre};70}717273