Stream: git-wasmtime

Topic: wasmtime / PR #2093 Start compiling module-linking modules


view this post on Zulip Wasmtime GitHub notifications bot (Aug 04 2020 at 19:16):

alexcrichton opened PR #2093 from compile-nested-modules to main:

This commit is intended to be the first of many in implementing the
module linking proposal. At this time this builds on #2059 so it
shouldn't land yet. The goal of this commit is to compile bare-bones
modules which use module linking, e.g. those with nested modules.

My hope with module linking is that almost everything in wasmtime only
needs mild refactorings to handle it. The goal is that all per-module
structures are still per-module and at the top level there's just a
Vec containing a bunch of modules. That's implemented currently where
wasmtime::Module contains Arc<[CompiledModule]> and an index of
which one it's pointing to. This should enable
serialization/deserialization of any module in a nested modules
scenario, no matter how you got it.

Tons of features of the module linking proposal are missing from this
commit. For example instantiation flat out doesn't work, nor does
import/export of modules or instances. That'll be coming as future
commits, but the purpose here is to start laying groundwork in Wasmtime
for handling lots of modules in lots of places.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2020 at 02:02):

alexcrichton updated PR #2093 from compile-nested-modules to main:

This commit is intended to be the first of many in implementing the
module linking proposal. At this time this builds on #2059 so it
shouldn't land yet. The goal of this commit is to compile bare-bones
modules which use module linking, e.g. those with nested modules.

My hope with module linking is that almost everything in wasmtime only
needs mild refactorings to handle it. The goal is that all per-module
structures are still per-module and at the top level there's just a
Vec containing a bunch of modules. That's implemented currently where
wasmtime::Module contains Arc<[CompiledModule]> and an index of
which one it's pointing to. This should enable
serialization/deserialization of any module in a nested modules
scenario, no matter how you got it.

Tons of features of the module linking proposal are missing from this
commit. For example instantiation flat out doesn't work, nor does
import/export of modules or instances. That'll be coming as future
commits, but the purpose here is to start laying groundwork in Wasmtime
for handling lots of modules in lots of places.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2020 at 02:11):

alexcrichton updated PR #2093 from compile-nested-modules to main:

This commit is intended to be the first of many in implementing the
module linking proposal. At this time this builds on #2059 so it
shouldn't land yet. The goal of this commit is to compile bare-bones
modules which use module linking, e.g. those with nested modules.

My hope with module linking is that almost everything in wasmtime only
needs mild refactorings to handle it. The goal is that all per-module
structures are still per-module and at the top level there's just a
Vec containing a bunch of modules. That's implemented currently where
wasmtime::Module contains Arc<[CompiledModule]> and an index of
which one it's pointing to. This should enable
serialization/deserialization of any module in a nested modules
scenario, no matter how you got it.

Tons of features of the module linking proposal are missing from this
commit. For example instantiation flat out doesn't work, nor does
import/export of modules or instances. That'll be coming as future
commits, but the purpose here is to start laying groundwork in Wasmtime
for handling lots of modules in lots of places.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2020 at 02:31):

alexcrichton has marked PR #2093 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 03 2020 at 18:25):

tschneidereit requested fitzgen for a review on PR #2093.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2020 at 21:44):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2020 at 21:44):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2020 at 21:44):

fitzgen created PR Review Comment:

So this only includes nested submodules, not the top level module? Good to make this explicit in the comment.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 06 2020 at 15:00):

alexcrichton submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 06 2020 at 15:00):

alexcrichton created PR Review Comment:

Ah good point, but yes, this only includes the top-level module's modules (or whatever the current module is), basically just "we found the module section in the wasm file"

view this post on Zulip Wasmtime GitHub notifications bot (Nov 06 2020 at 18:56):

alexcrichton updated PR #2093 from compile-nested-modules to main:

This commit is intended to be the first of many in implementing the
module linking proposal. At this time this builds on #2059 so it
shouldn't land yet. The goal of this commit is to compile bare-bones
modules which use module linking, e.g. those with nested modules.

My hope with module linking is that almost everything in wasmtime only
needs mild refactorings to handle it. The goal is that all per-module
structures are still per-module and at the top level there's just a
Vec containing a bunch of modules. That's implemented currently where
wasmtime::Module contains Arc<[CompiledModule]> and an index of
which one it's pointing to. This should enable
serialization/deserialization of any module in a nested modules
scenario, no matter how you got it.

Tons of features of the module linking proposal are missing from this
commit. For example instantiation flat out doesn't work, nor does
import/export of modules or instances. That'll be coming as future
commits, but the purpose here is to start laying groundwork in Wasmtime
for handling lots of modules in lots of places.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 06 2020 at 18:58):

alexcrichton updated PR #2093 from compile-nested-modules to main:

This commit is intended to be the first of many in implementing the
module linking proposal. At this time this builds on #2059 so it
shouldn't land yet. The goal of this commit is to compile bare-bones
modules which use module linking, e.g. those with nested modules.

My hope with module linking is that almost everything in wasmtime only
needs mild refactorings to handle it. The goal is that all per-module
structures are still per-module and at the top level there's just a
Vec containing a bunch of modules. That's implemented currently where
wasmtime::Module contains Arc<[CompiledModule]> and an index of
which one it's pointing to. This should enable
serialization/deserialization of any module in a nested modules
scenario, no matter how you got it.

Tons of features of the module linking proposal are missing from this
commit. For example instantiation flat out doesn't work, nor does
import/export of modules or instances. That'll be coming as future
commits, but the purpose here is to start laying groundwork in Wasmtime
for handling lots of modules in lots of places.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 06 2020 at 19:32):

alexcrichton merged PR #2093.


Last updated: Dec 23 2024 at 12:05 UTC