Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

858 B
Raw Blame
//! Experimental, unstable and incomplete implementation of wasip3 version of `wasi:tls`.
//!
//! This module is under heavy development.
//! It is not compliant with semver and is not ready
//! for production use.
//!
//! Bug and security fixes limited to wasip3 will not be given patch releases.
//!
//! Documentation of this module may be incorrect or out-of-sync with the implementation.

pub mod bindings;
pub mod host;
pub(crate) mod util;

use crate::{WasiTls, WasiTlsView};
use bindings::tls::{client, types};
use wasmtime::component::Linker;

/// Add all interfaces from this module into the `linker` provided.
pub fn add_to_linker<T>(linker: &mut Linker<T>) -> wasmtime::Result<()>
where
    T: WasiTlsView + 'static,
{
    client::add_to_linker::<_, WasiTls>(linker, T::tls)?;
    types::add_to_linker::<_, WasiTls>(linker, T::tls)?;
    Ok(())
}