Skip to content

cpp-api: WasmType/Val does not handle endianness conversions from native types on big-endian platforms #12784

@leonm1

Description

@leonm1

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: proxy-wasm/proxy-wasm-cpp-host#503 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasmtime:c-apiIssues pertaining to the C API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions