Skip to main content

wasmtime_wasi_tls/p3/
mod.rs

1//! Experimental, unstable and incomplete implementation of wasip3 version of `wasi:tls`.
2//!
3//! This module is under heavy development.
4//! It is not compliant with semver and is not ready
5//! for production use.
6//!
7//! Bug and security fixes limited to wasip3 will not be given patch releases.
8//!
9//! Documentation of this module may be incorrect or out-of-sync with the implementation.
10
11pub mod bindings;
12pub mod host;
13pub(crate) mod util;
14
15use crate::{WasiTls, WasiTlsView};
16use bindings::tls::{client, types};
17use wasmtime::component::Linker;
18
19/// Add all interfaces from this module into the `linker` provided.
20pub fn add_to_linker<T>(linker: &mut Linker<T>) -> wasmtime::Result<()>
21where
22    T: WasiTlsView + 'static,
23{
24    client::add_to_linker::<_, WasiTls>(linker, T::tls)?;
25    types::add_to_linker::<_, WasiTls>(linker, T::tls)?;
26    Ok(())
27}