alexcrichton opened PR #4206 from component-trampolines
to main
:
This commit adds support to the component model implementation for
compiling trampolines suitable for calling host imports. Currently this
is purely just the compilation side of things, modifying the
wasmtime-cranelift crate and additionally filling out a new
VMComponentOffsets
type (similar toVMOffsets
). The actual creation
of aVMComponentContext
is still not performed and will be a
subsequent PR.Internally though some tests are actually possible with this where we at
least assert that compilation of a component and creation of everything
in-memory doesn't panic or trip any assertions, so some tests are added
here for that as well.<!--
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 #4206.
alexcrichton updated PR #4206 from component-trampolines
to main
.
fitzgen submitted PR review.
fitzgen submitted PR review.
fitzgen created PR review comment:
Aside: should this be
VMStringEncoding
since we pass it to JIT code?
fitzgen created PR review comment:
I guess the same goes for
ValRaw
, although this is relatively long-standing at this point.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Hm perhaps yeah, although this is defined in
wasmtime-environ
which doesn't haveVM*
things in general. I did leave documentation there explaining therepr(u8)
as well, so I think I'll leave this as-is to avoid too many definitions of the same thing, but we can always tweak in the future of course.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
True yeah, although I sort of just invented the
ValRaw
name as it was the raw version ofwasmtime::Val
. We don't otherwise exportVM*
types to the outside world whichwasmtime::ValRaw
is, though. One way to solve this perhaps would be astruct ValRaw(VMValRaw)
or similar, but I'm not sure if it's worth it per se.
alexcrichton merged PR #4206.
Last updated: Dec 23 2024 at 12:05 UTC