diff --git a/src/decoders/wat.rs b/src/decoders/wat.rs index f9a9015..7e91fad 100644 --- a/src/decoders/wat.rs +++ b/src/decoders/wat.rs @@ -325,6 +325,18 @@ impl<'a> Parse<'a> for Instruction { parser.parse::()?; Ok(Instruction::StringSize) + } else if lookahead.peek::() { + parser.parse::()?; + + Ok(Instruction::ByteArrayLiftMemory) + } else if lookahead.peek::() { + parser.parse::()?; + + Ok(Instruction::ByteArrayLowerMemory) + } else if lookahead.peek::() { + parser.parse::()?; + + Ok(Instruction::ByteArraySize) } else if lookahead.peek::() { parser.parse::()?; diff --git a/src/encoders/wat.rs b/src/encoders/wat.rs index 66e1b60..33dfd53 100644 --- a/src/encoders/wat.rs +++ b/src/encoders/wat.rs @@ -73,7 +73,7 @@ impl ToString for &InterfaceType { InterfaceType::F32 => "f32".to_string(), InterfaceType::F64 => "f64".to_string(), InterfaceType::String => "string".to_string(), - InterfaceType::ByteArray => "byteArray".to_string(), + InterfaceType::ByteArray => "byte_array".to_string(), InterfaceType::Anyref => "anyref".to_string(), InterfaceType::I32 => "i32".to_string(), InterfaceType::I64 => "i64".to_string(),