Skip to content

Implement the basics of component model#2695

Draft
zherczeg wants to merge 4 commits intoWebAssembly:mainfrom
zherczeg:component_basic
Draft

Implement the basics of component model#2695
zherczeg wants to merge 4 commits intoWebAssembly:mainfrom
zherczeg:component_basic

Conversation

@zherczeg
Copy link
Copy Markdown
Collaborator

This is an experimental (draft) patch. I don't know how much it fits into the concept of wabt. Wabt has the necessary helpers though.

Components are a layer (layer 1) above module layer (layer 0). It has no official specification, only explainers. It has a binary and text format similar to modules.

@zherczeg zherczeg force-pushed the component_basic branch 2 times, most recently from d04709a to 3f2f212 Compare February 13, 2026 09:30
@zherczeg zherczeg force-pushed the component_basic branch 3 times, most recently from f2a0b3b to 0f3bbbe Compare February 26, 2026 10:51
@zherczeg zherczeg force-pushed the component_basic branch 13 times, most recently from 08ab8dd to 7b99f16 Compare March 11, 2026 11:20
@zherczeg zherczeg force-pushed the component_basic branch 4 times, most recently from 9ae0356 to 1279ea2 Compare March 18, 2026 12:47
@zherczeg zherczeg force-pushed the component_basic branch 4 times, most recently from d724780 to 4f8a1ed Compare March 23, 2026 13:30
@zherczeg
Copy link
Copy Markdown
Collaborator Author

Status summary. This patch is grown to ~7500 lines addition including an 1500 line update of lexer-keywords.txt. The wasm2wat and wat2wasm tools are extended with component support, which is capable of parsing a hello world component created by clang both in text and binary form. Validation is not implemented.

Is component support useful for this project?

@zherczeg
Copy link
Copy Markdown
Collaborator Author

Note: component support is based on this document:
https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md

@zherczeg zherczeg force-pushed the component_basic branch 2 times, most recently from e6e94ae to e311277 Compare March 24, 2026 13:22
@sbc100
Copy link
Copy Markdown
Member

sbc100 commented Mar 24, 2026

Status summary. This patch is grown to ~7500 lines addition including an 1500 line update of lexer-keywords.txt. The wasm2wat and wat2wasm tools are extended with component support, which is capable of parsing a hello world component created by clang both in text and binary form. Validation is not implemented.

Is component support useful for this project?

I think this work is going to be useful, but I don't have a lot of time to spend reviewing right now, and I think this probably some lower in the priority queue and the all the GC and wasm 3.0 stuff, right?

@zherczeg
Copy link
Copy Markdown
Collaborator Author

Yes, this is a very low priority patch. It will be a draft for a long time. Honestly, I don't even know what is the best shape for it. I refactored it like 10 times, and still a lot of things are unclear. Anyway, Wabt has all the utility functions for implementing the component model, that is why I built on the top of it.

This patch supports parsing the new GC types
- Abstract types
- Recursive types
- Composite types

The patch also improves type comparison.
@zherczeg zherczeg force-pushed the component_basic branch 2 times, most recently from 0576617 to 10eeb5d Compare April 1, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants