Stream: git-wasmtime

Topic: wasmtime / issue #10486 What is the reason for the `V128`...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 16:10):

Robbepop opened issue #10486:

When Wasmtime's CLI returns a v128 value, it is formatted as u128 value.
In Wasmi I have had a lot of thoughts about the formatting of v128 values and came to the conclusion that it is probably best to format it as hex-dec number with leading zeros. For example: 0x616E5F6E61635F6E61635F6E61635F6E

Was there a specific reason Wasmtime chose to format v128 as a simple u128?

Ideally Wasmi has the same formatting as Wasmtime (or more generally: Wasm runtimes share the same formatting), but at this point I find the u128 formatting to be very weird and thus I suppose I am missing something here.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 19:59):

abrown commented on issue #10486:

Yeah, I also prefer the hex format; that's what I think of when I'm thinking about lanes. Not sure why we used the u128 formatting. Convenience perhaps?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 20:26):

Robbepop edited issue #10486:

When Wasmtime's CLI returns a v128 value, it is formatted as u128 value.
In Wasmi I have made some thoughts about the formatting of v128 values and came to the conclusion that it is probably best to format it as hex-dec number with leading zeros. For example: 0x616E5F6E61635F6E61635F6E61635F6E

Was there a specific reason Wasmtime chose to format v128 as a simple u128?

Ideally Wasmi has the same formatting as Wasmtime (or more generally: Wasm runtimes share the same formatting), but at this point I find the u128 formatting to be very weird and thus I suppose I am missing something here.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 29 2025 at 20:26):

Robbepop edited issue #10486:

When Wasmtime's CLI returns a v128 value, it is formatted as u128 value.
In Wasmi I have made some thoughts about the formatting of v128 values and came to the conclusion that it is probably best to format it as hex-dec number with leading zeros. For example: 0x006E006E61635F6E61635F6E61635F6E

Was there a specific reason Wasmtime chose to format v128 as a simple u128?

Ideally Wasmi has the same formatting as Wasmtime (or more generally: Wasm runtimes share the same formatting), but at this point I find the u128 formatting to be very weird and thus I suppose I am missing something here.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 31 2025 at 14:34):

alexcrichton commented on issue #10486:

Yeah I think the reason for the current formatting is that prior to v128 everything printed as a number, so "why not also print as a number". I think it'd be reasonable to change as we don't guarantee the formatting at this time.


Last updated: Apr 18 2025 at 16:03 UTC