Skip to main content

Crate wasmtime_wasi_http

Crate wasmtime_wasi_http 

Source
Expand description

Wasmtime’s implementation of wasi:http

This crate is organized similarly to wasmtime_wasi where there is a top-level p2 and p3 module corresponding to the implementation for WASIp2 and WASIp3.

Modules§

handlercomponent-model-async
Provides utilities useful for dispatching incoming HTTP requests wasi:http/handler guest instances.
io
I/O utility for bridging between tokio::io and hyper::rt.
p2p2
Wasmtime’s WASI HTTPp2 Implementation
p3p3
Experimental, unstable and incomplete implementation of wasip3 version of wasi:http.

Structs§

FieldMap
A wrapper around [http::HeaderMap] which implements wasi:http semantics.
RequestOptions
The concrete type behind a wasi:http/types.request-options resource.
WasiHttp
A helper struct which implements HasData for the wasi:http APIs.
WasiHttpCtx
Capture the state necessary for use in the wasi-http API implementation.
WasiHttpCtxView
Basis of implementation of all wasi:http APIs in this crate.

Enums§

Error
Error type for wasi:http embedder interactions.
FieldMapError
Errors that can happen when mutating/operating on a FieldMap.

Constants§

DEFAULT_FORBIDDEN_HEADERS
Set of [http::header::HeaderName], that are forbidden by default for requests and responses originating in the guest.

Traits§

WasiHttpHooks
A trait which provides hooks into internal WASI HTTP operations.
WasiHttpView
A trait which provides internal WASI HTTP state.

Functions§

default_hooksdefault-send-request
Returns a value suitable for the WasiHttpCtxView::hooks field which has the default behavior for wasi:http.
default_send_requestdefault-send-request
The default implementation of how an outgoing request is sent.

Type Aliases§

Result
Convenience type for a result with Error
WasiBody
Convenience type definition for the bodies used in this crate.