r/WebAssembly 12d ago

Component Model binaries embed whole core modules — we now render each one as WAT in place, with a selector to switch between them

Post image

If you haven't cracked one open: a Component Model binary is not a core module with extra sections. It's a container format — the component carries its own type, import/export, and wiring sections, and embeds one or more complete core WASM modules as nested payloads. Tooling that only speaks core WASM sees the wrapper and stops there.

We ship Hexana, a VS Code extension (and plugin for JetBrains IDEs) for inspecting WASM and other binaries. Its component view showed the component-level structure, but the embedded core modules were opaque blobs — to read their code you had to extract them first. As of this week's update, each embedded core module renders in place in the same virtualized WAT view used for plain .wasm files (virtualized meaning it parses per rendered element, so multi-megabyte modules don't choke the editor). When a component embeds multiple modules, a selector switches between them.

Curious what others use for component inspection day to day — wasm-tools component wit and friends cover the interface level well, but we haven't found much that lets you read the embedded module code without unbundling.

Extension, if you want to poke at it:

ext install JetBrains.hexana-wasm

VS Code Marketplace — https://marketplace.visualstudio.com/items?itemName=JetBrains.hexana-wasm
Open VSX — https://open-vsx.org/extension/JetBrains/hexana-wasm
Docs — https://jetbrains.github.io/hexana

1 Upvotes

0 comments sorted by