You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example encodes the i64x2.le_s instruction using wasm-encoder and then reads it back using wasmparser, but doesn't round trip:
use wasm_encoder::{Encode,Function,Instruction};use wasmparser::FunctionBody;fnmain(){letmut function = Function::new(vec![]);
function.instruction(&Instruction::I64x2LeS);letmut buf = vec![];
function.encode(&mut buf);println!("{:x?}", buf);// Skip leading byte containing the function body length.let body = FunctionBody::new(0,&buf[1..]);letmut reader = body.get_operators_reader().unwrap();println!("{:?}", reader.read().unwrap());}
output:
[4, 0, fd, dd, 1]
I64x2ExtMulHighI32x4S
The text was updated successfully, but these errors were encountered:
The following example encodes the
i64x2.le_s
instruction usingwasm-encoder
and then reads it back usingwasmparser
, but doesn't round trip:output:
The text was updated successfully, but these errors were encountered: