Add support for the experimental wasi-crypto APIs (#2597)
* Add support for the experimental wasi-crypto APIs The sole purpose of the implementation is to allow bindings and application developers to test the proposed APIs. Rust and AssemblyScript bindings are also available as examples. Like `wasi-nn`, it is currently disabled by default, and requires the `wasi-crypto` feature flag to be compiled in. * Rename the wasi-crypto/spec submodule * Add a path dependency into the submodule for wasi-crypto * Tell the publish script to vendor wasi-crypto
This commit is contained in:
31
crates/wasi-crypto/src/lib.rs
Normal file
31
crates/wasi-crypto/src/lib.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
mod wiggle_interfaces;
|
||||
|
||||
pub use wiggle_interfaces::WasiCryptoCtx;
|
||||
|
||||
wasmtime_wiggle::wasmtime_integration!({
|
||||
target: wiggle_interfaces::wasi_modules,
|
||||
witx: ["$CARGO_MANIFEST_DIR/spec/witx/wasi_ephemeral_crypto.witx"],
|
||||
ctx: WasiCryptoCtx,
|
||||
modules: {
|
||||
wasi_ephemeral_crypto_common =>
|
||||
{
|
||||
name: WasiCryptoCommon,
|
||||
docs: "wasi-crypto - Common module."
|
||||
},
|
||||
wasi_ephemeral_crypto_asymmetric_common =>
|
||||
{
|
||||
name: WasiCryptoAsymmetricCommon,
|
||||
docs: "wasi-crypto - Common module for asymmetric operations."
|
||||
},
|
||||
wasi_ephemeral_crypto_signatures =>
|
||||
{
|
||||
name: WasiCryptoSignatures,
|
||||
docs: "wasi-crypto - Signature module."
|
||||
},
|
||||
wasi_ephemeral_crypto_symmetric =>
|
||||
{
|
||||
name: WasiCryptoSymmetric,
|
||||
docs: "wasi-crypto - Symmetric cryptography module."
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user