xref: /wasmtime-44.0.1/crates/wasi-tls/src/p3/mod.rs (revision 51732cfe)
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 
11 pub mod bindings;
12 pub mod host;
13 pub(crate) mod util;
14 
15 use crate::{WasiTls, WasiTlsView};
16 use bindings::tls::{client, types};
17 use wasmtime::component::Linker;
18 
19 /// Add all interfaces from this module into the `linker` provided.
add_to_linker<T>(linker: &mut Linker<T>) -> wasmtime::Result<()> where T: WasiTlsView + 'static,20 pub fn add_to_linker<T>(linker: &mut Linker<T>) -> wasmtime::Result<()>
21 where
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 }
28