From 539167fa2665421a061a129f1650b727150d36a8 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 3 May 2026 15:42:37 +0200 Subject: chore: unify v128 representation Signed-off-by: Henry --- crates/cli/src/value_parse.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/cli/src/value_parse.rs') diff --git a/crates/cli/src/value_parse.rs b/crates/cli/src/value_parse.rs index f64d335..f9ffbbb 100644 --- a/crates/cli/src/value_parse.rs +++ b/crates/cli/src/value_parse.rs @@ -17,7 +17,10 @@ fn parse_arg(index: usize, ty: WasmType, value: &str) -> Result { WasmType::I64 => value.parse::().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, WasmType::F32 => value.parse::().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, WasmType::F64 => value.parse::().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, - WasmType::V128 => value.parse::().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, + WasmType::V128 => value + .parse::() + .map(|v| WasmValue::V128(v.to_le_bytes())) + .map_err(|e| format_error(index, ty, value, e))?, WasmType::RefFunc | WasmType::RefExtern => { bail!( "unsupported CLI argument type at position {}: {}; use the embedding API for reference values", -- cgit v1.3.1