diff options
| author | Henry <mail@henrygressmann.de> | 2026-05-03 15:42:37 +0200 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2026-05-03 15:42:37 +0200 |
| commit | 539167fa2665421a061a129f1650b727150d36a8 (patch) | |
| tree | 0c1f19535d1d122f4414b6199be1a6b4f1f98377 /crates/cli/src/value_parse.rs | |
| parent | 1a58b1c7cb550d16380e1249d25e894f524ff1be (diff) | |
chore: unify v128 representation
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates/cli/src/value_parse.rs')
| -rw-r--r-- | crates/cli/src/value_parse.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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<WasmValue> { WasmType::I64 => value.parse::<i64>().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, WasmType::F32 => value.parse::<f32>().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, WasmType::F64 => value.parse::<f64>().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, - WasmType::V128 => value.parse::<i128>().map(WasmValue::from).map_err(|e| format_error(index, ty, value, e))?, + WasmType::V128 => value + .parse::<i128>() + .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", |
