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

Function deserialize_from_serialized

tests/all/component_model/aot.rs:74–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73#[test]
74fn deserialize_from_serialized() -> Result<()> {
75 let engine = super::engine();
76 let buffer1 = Component::new(&engine, "(component (core module))")?.serialize()?;
77 let buffer2 = unsafe { Component::deserialize(&engine, &buffer1)?.serialize()? };
78 assert!(buffer1 == buffer2);
79 Ok(())
80}
81
82// This specifically tests the current behavior that it's an error, but this can
83// be made to work if necessary in the future. Currently the implementation of

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
engineFunction · 0.50
newFunction · 0.50
deserializeFunction · 0.50
serializeMethod · 0.45

Tested by

no test coverage detected