Should type imports be restricted to defined types and resources
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- wasm
- Domain
- compilers
Research direction
Read the issue's component text examples and the tests added in wasm-tools PR 2833. Decide whether imports of instance, component, and function types should be allowed, and clarify the intended rules for type imports, including the exported-type example. Done means the specification has a clear decision and corresponding behavior is agreed upon.
Written by the indexing model from the issue text.
Description
It turns out that wasmparser as a slew of minor issues related to handling type imports of instance, component, and function types. For example:
(component
(type $f (func))
(import "f" (type (eq $f)))
)
One example is that wasmparser rejects, likely erroneously, this currently:
(component
(type $f (func))
(export "f" (type $f))
(import "g" (type (eq $f)))
)
Another example is tests added in https://github.com/bytecodealliance/wasm-tools/pull/2833 as well.
Overall I'm not aware of an actual use case of this. Resources make sense, and defined types make sense for bindings generation, but I'm not sure importing other kinds of types has much of a use case beyond "let's fill out the full matrix". I wanted to raise this as a very-not-urgent issue as a result in case others had thoughts on this.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 134
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WebAssembly/component-model
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WebAssembly/component-model#609 · 2 comments · 1 reaction ·
Maintainers usually reply within 4 days
-
Difficulty 5/5 Over a week Newbie friendliness 12/100
WebAssembly/component-model#768 · 1 comment ·
Maintainers usually reply within 4 days
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
WebAssembly/component-model#765 · 1 comment ·
Maintainers usually reply within 4 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
WebAssembly/component-model#753 · 1 comment · 1 reaction ·
Maintainers usually reply within 4 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
WebAssembly/component-model#752 · 13 comments · 1 reaction ·
Maintainers usually reply within 4 days
All issues in WebAssembly/component-model
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
DAE2 crashes on call.without.effects with a non ref.func expressionPossibly taken @stevenfontanella claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
WebAssembly/binaryen#9404 ·
Maintainers usually reply within 1 day
-
area:compiler effort:S impact:med platform:windows type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area:Analysis enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
facebookresearch/atlas-lean#5118 ·
Maintainers usually reply within 1 day
-
C-bugfix
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Quantinuum/hugr#3354 ·
Maintainers usually reply within 1 day