WebAssembly / wabt

The WebAssembly Binary Toolkit
Apache License 2.0
6.9k stars 702 forks source link

Issue a nicer error message on wasm components. #2515

Open sunfishcode opened 1 day ago

sunfishcode commented 1 day ago

Decode just enough of the component binary format to recognize when the input is a component, and issue a dedicated error message for it.

Before:

0000008: error: bad wasm file version: 0x1000d (expected 0x1)

After:

0000008: error: wasm components are not yet supported in this tool

SoniEx2 commented 1 day ago

this should probably have a dedicated test for it fwiw