bytecodealliance / bytecodealliance/wasmtime
components: Support creation of a function types and support type comparisons
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
Currently the `Linker::func_new` API added in https://github.com/bytecodealliance/wasmtime/pull/4537 has a bit of an odd API for the creation of a host function. Instead of taking a `Component`/string pair this should ideally look similar to the core wasm support where a function type is created directly.
This will entail being able to create a function type at runtime. Note that this is nontrivial compared to the support for core wasm since the type hierarchy is more complicated. I'm not sure how best this would work.
Additionally shortly after this is implemented we'll need to also implement the ability to compare two types across two different `ComponentTypes` stores. Currently type equality only checks indices but in the case of different indices a deep type equality needs to be performed.
Contributor guide
Assessment
This issue has not been assessed yet.