Stream: git-wasmtime

Topic: wasmtime / PR #4215 Add a `VMComponentContext` type and c...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 15:03):

alexcrichton opened PR #4215 from component-vmcomponent to main:

This commit fills out the wasmtime-runtime crate's support for
VMComponentContext and creates it as part of the instantiation
process. This moves a few maps that were temporarily allocated in an
InstanceData into the VMComponentContext and additionally reads the
canonical options data from there instead.

This type still won't be used in its "full glory" until the lowering of
host functions is completely implemented, however, which will be coming
in a future commit.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 15:03):

alexcrichton requested fitzgen for a review on PR #4215.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 17:18):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 17:18):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 17:18):

fitzgen created PR review comment:

This isn't technically safe right? Since the ComponentInstance is logically pinned, giving out an &mut would allow moving it out by std::mem::replaceing it.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 17:36):

alexcrichton updated PR #4215 from component-vmcomponent to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 17:36):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 17:36):

alexcrichton created PR review comment:

That's a great point actually and something I totally missed! I removed this, made it a private internal accessor, and reexported &mut self methods from the un-owned version to the owned version.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 17:39):

alexcrichton updated PR #4215 from component-vmcomponent to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2022 at 18:34):

alexcrichton merged PR #4215.


Last updated: Dec 23 2024 at 12:05 UTC