Skip to content

json-from-wast fails if the wast file contains an expected result #2431

@mpoindexter

Description

@mpoindexter

assert_return test cases like (assert_return (invoke "i-to-s16" (u32.const 0xffffffff)) (s16.const -1)) fail with an error like error: cannot serialize tagged newtype variant ComponentConst::U32 containing a string

I think https://github.com/bytecodealliance/wasm-tools/blob/main/crates/json-from-wast/src/lib.rs#L563 just needs to be changed to #[serde(tag = "type", content = "value",rename_all = "lowercase")] - seems to work locally anyway, but I'm pretty unfamiliar with Rust and serde

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions