Skip to content

module-linking: Implement outer module aliases - #2590

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:module-closures
Jan 21, 2021
Merged

module-linking: Implement outer module aliases#2590
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:module-closures

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit fully implements outer aliases of the module linking
proposal. Outer aliases can now handle multiple-level-up aliases and now
properly also handle closed-over-values of modules that are either
imported or defined.

The structure of wasmtime::Module was altered as part of this commit.
It is now a compiled module plus two lists of "upvars", or closed over
values used when instantiating the module. One list of upvars is
compiled artifacts which are submodules that could be used. Another is
module values that are injected via outer aliases. Serialization and
such have been updated as appropriate to handle this.

This commit fully implements outer aliases of the module linking
proposal. Outer aliases can now handle multiple-level-up aliases and now
properly also handle closed-over-values of modules that are either
imported or defined.

The structure of `wasmtime::Module` was altered as part of this commit.
It is now a compiled module plus two lists of "upvars", or closed over
values used when instantiating the module. One list of upvars is
compiled artifacts which are submodules that could be used. Another is
module values that are injected via outer aliases. Serialization and
such have been updated as appropriate to handle this.
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jan 20, 2021
@github-actions

Copy link
Copy Markdown

Subscribe to Label Action

cc @peterhuene

Details This issue or pull request has been labeled: "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton
alexcrichton merged commit 207f60a into bytecodealliance:main Jan 21, 2021
@alexcrichton
alexcrichton deleted the module-closures branch January 21, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants