Skip to content

Using wast in combination with wasm-encoder #327

Open
@LHolten

Description

@LHolten

I'm trying to parse a WAT Expression and emit the instructions into a wasm-encoder Function.
This is for a language compiler i'm writing that has inlines WAT code.

The problem is that wast::Instruction is not compatible with wasm_encoder::Instruction.
Also the wast::binary::Encode trait is private, so i can't use that in combination with wasm_encoder::Function::raw either.

My suggestion is to either make the wast Encode trait public, or implement From<wast::Instruction> for wasm_encoder::Instruction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wastRelated to the text format of WebAssembly (wat/wast)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions