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

Function decode_unaligned

tests/all/pulley.rs:504–517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

502// feature of the `object` crate is enabled.
503#[test]
504fn decode_unaligned() -> Result<()> {
505 let engine = Engine::new(&pulley_config())?;
506 let mut bytes = Module::new(&engine, "(module)")?.serialize()?;
507
508 for i in 0..10 {
509 let serialized = &bytes[i..];
510 unsafe {
511 Module::deserialize_raw(&engine, NonNull::from(serialized))?;
512 }
513 bytes.insert(0, 0);
514 }
515
516 Ok(())
517}

Callers

nothing calls this directly

Calls 6

pulley_configFunction · 0.85
fromFunction · 0.85
OkFunction · 0.85
newFunction · 0.50
serializeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected