leonm1 opened issue #12784:
The c-api indicates the values stored in wasmtime_val_raw_t indicate they must be little-endian.
For the cpp-api, passing native cpp types (such as uint32_t, uint64_t, etc) to wasmtime::WasmType does not perform the endianness conversion on big-endian platforms when storing directly into wasmtime_val_raw_t. I believe wasmtime::Val also needs endianness conversions.
Related: https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/503#discussion_r2934516888
alexcrichton added the wasmtime:c-api label to Issue #12784.
alexcrichton commented on issue #12784:
Thanks for the report! And yeah this is definitely a bug and would be good to fix!
Last updated: Mar 23 2026 at 16:19 UTC