This commit primarily adds a complete example of using
wasmtime-wasi-http to the documentation. Along the way I've done a
number of other refactorings too:
bindgen!-generated *Pre structures now implement Clone.
bindgen!-generated *Pre structures now have an engine method.
bindgen!-generated *Pre structures now have an instance_pre method.
The structure of wasmtime-wasi-http now matches wasmtime-wasi,
notably:
The proxy module is removed
wasmtime_wasi_http::add_to_linker_{a,}sync is the top level
add-to-linker function.
The bindings module now contains Proxy and ProxyPre along with
a sync submodule.
The bindings module contains all bindings for wasi:http things.
The add_only_* methods are un-hidden and documented.
Code processing req has been simplified by avoiding
decomposing-and-reconstructing a request.
The new_incoming_request method is now generic to avoid callers
having to do boxing/mapping themselves.
I initially wanted to do more refactoring and documenting but I ran out of steam after this so this is where I'm going to leave it for now.
This commit primarily adds a complete example of using
wasmtime-wasi-http
to the documentation. Along the way I've done a number of other refactorings too:bindgen!
-generated*Pre
structures now implementClone
.bindgen!
-generated*Pre
structures now have anengine
method.bindgen!
-generated*Pre
structures now have aninstance_pre
method.wasmtime-wasi-http
now matcheswasmtime-wasi
, notably:proxy
module is removedwasmtime_wasi_http::add_to_linker_{a,}sync
is the top level add-to-linker function.bindings
module now containsProxy
andProxyPre
along with async
submodule.bindings
module contains all bindings forwasi:http
things.add_only_*
methods are un-hidden and documented.req
has been simplified by avoiding decomposing-and-reconstructing a request.new_incoming_request
method is now generic to avoid callers having to do boxing/mapping themselves.I initially wanted to do more refactoring and documenting but I ran out of steam after this so this is where I'm going to leave it for now.
Closes #8832