wasmtime_wasi_crypto/
lib.rs

1mod wiggle_interfaces;
2
3pub use wiggle_interfaces::WasiCryptoCtx;
4
5pub fn add_to_linker<T>(
6    linker: &mut wasmtime::Linker<T>,
7    get_cx: impl Fn(&mut T) -> &mut WasiCryptoCtx + Send + Sync + Copy + 'static,
8) -> anyhow::Result<()> {
9    use wiggle_interfaces::wasi_modules as w;
10    w::wasi_ephemeral_crypto_common::add_to_linker(linker, get_cx)?;
11    w::wasi_ephemeral_crypto_asymmetric_common::add_to_linker(linker, get_cx)?;
12    w::wasi_ephemeral_crypto_signatures::add_to_linker(linker, get_cx)?;
13    w::wasi_ephemeral_crypto_symmetric::add_to_linker(linker, get_cx)?;
14    Ok(())
15}