MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / serialize

Function serialize

tests/all/module_serialize.rs:5–8  ·  view source on GitHub ↗
(engine: &Engine, wat: &str)

Source from the content-addressed store, hash-verified

3use wasmtime::*;
4
5fn serialize(engine: &Engine, wat: &str) -> Result<Vec<u8>> {
6 let module = Module::new(&engine, wat)?;
7 Ok(module.serialize()?)
8}
9
10unsafe fn deserialize_and_instantiate(store: &mut Store<()>, buffer: &[u8]) -> Result<Instance> {
11 let module = unsafe { Module::deserialize(store.engine(), buffer)? };

Callers 6

test_version_mismatchFunction · 0.70
serialize_and_callFunction · 0.70
detect_precompiledFunction · 0.70

Calls 3

OkFunction · 0.85
newFunction · 0.50
serializeMethod · 0.45

Tested by 3

test_version_mismatchFunction · 0.56