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

Function deserialize_from_serialized

tests/all/module_serialize.rs:130–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128#[test]
129#[cfg_attr(miri, ignore)]
130fn deserialize_from_serialized() -> Result<()> {
131 let engine = Engine::default();
132 let buffer1 = serialize(
133 &engine,
134 "(module (func (export \"run\") (result i32) i32.const 42))",
135 )?;
136 let buffer2 = unsafe { Module::deserialize(&engine, &buffer1)?.serialize()? };
137 assert!(buffer1 == buffer2);
138 Ok(())
139}
140
141#[test]
142#[cfg_attr(miri, ignore)]

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
serializeFunction · 0.70
deserializeFunction · 0.50
serializeMethod · 0.45

Tested by

no test coverage detected