alexcrichton opened PR #4208 from component-linker
to main
:
As a step towards implementing function imports into a component this
commit implements importing modules into a component. This fills out
missing pieces of functionality such as exporting modules as well. The
previous translation code had initial support for translating imported
modules but some of the AST type information was restructured with
feedback from this implementation, namely splitting the
InstantiateModule
initializer into separate upvar/import variants to
clarify that the item orderings for imports are resolved differently at
runtime.Much of this commit is also adding infrastructure for any imports at all
into a component. For example aLinker
type (analagous to
wasmtime::Linker
) was added here as well. For now this type is quite
limited due to the inability to define host functions (it can only work
with instances and instances-of-modules) but it's enough to start
writing*.wast
tests which exercise lots of module-related functionality.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
alexcrichton requested fitzgen for a review on PR #4208.
alexcrichton updated PR #4208 from component-linker
to main
.
fitzgen submitted PR review.
alexcrichton merged PR #4208.
Last updated: Nov 22 2024 at 17:03 UTC