Stream: git-wasmtime

Topic: wasmtime / PR #4005 Initial skeleton of some component mo...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2022 at 18:09):

alexcrichton requested fitzgen for a review on PR #4005.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2022 at 18:09):

alexcrichton opened PR #4005 from component-model to main:

This commit is the first of what will likely be many to implement the
component model proposal in Wasmtime. This will be structured as a
series of incremental commits, most of which haven't been written yet.
My hope is to make this incremental and over time to make this easier to
review and easier to test each step in isolation.

Here much of the skeleton of how components are going to work in
Wasmtime is sketched out. This is not a complete implementation of the
component model so it's not all that useful yet, but some things you can
do are:

This is already starting to diverge from the previous module linking
representation where a Component will try to avoid unnecessary
metadata about the component and instead internally only have the bare
minimum necessary to instantiate the module. My hope is we can avoid
constructing most of the index spaces during instantiation only for it
to all ge thrown away. Additionally I'm predicting that we'll need to
see through processing where possible to know how to generate adapters
and where they are fused.

At this time you can't actually call a component's functions, and that's
the next PR that I would like to make.

<!--

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 (Apr 07 2022 at 20:18):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

/// This type is intended to mirror the `Module` type in this crate which

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

/// This represents how a function was lifted, what options were used to lift

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

I too am annoyed by how rustfmt will squoosh comments down into doc comments :pensive:

    // is implemented.
    //
    /// Modules and how they're defined (either closed-over or imported)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

Why match &func here, which require derefs for type_index and func_index when the matched func is never used again?

                    let func = match func? {
                        wasmparser::ComponentFunction::Lift {
                            type_index,
                            func_index,
                            options,
                        } => {
                            let ty = TypeIndex::from_u32(type_index);
                            let func = FuncIndex::from_u32(func_index);
                            self.lift_function(ty, func, options)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

This clone is necessary because this method takes a &Payload instead of a Payload but the only caller doesn't reuse the payload so it might as well give ownership to this function and then readers won't have to go down a rabbit hole wondering why the heck this seemingly-unnecessary clone is here.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

A thing that translates? Should this be called a Translator?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

/// Canonical ABI options associated with a lifted function.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

Would be nice if we added a len method to wasmparser::Range.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

Can this be a From implementation?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

    /// Note that this is unsafe as the validity of `item` is not verified and

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

Once this method takes Payload by value this can be rewritten without the clones:

                let old_parser = mem::replace(&mut self.parser, parser);
                self.parsers.push(old_parser);

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2022 at 22:47):

fitzgen created PR review comment:

That isn't quite grammatical, but I think this is what you mean?

/// Different ways to instantiate a module at runtime.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2022 at 16:44):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2022 at 17:02):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2022 at 17:02):

alexcrichton created PR review comment:

Consider me sufficiently inspired

view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2022 at 18:47):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2022 at 18:33):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2022 at 18:48):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 00:20):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 14:42):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 14:44):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 14:46):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 15:16):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 15:38):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 17:22):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 19:13):

alexcrichton updated PR #4005 from component-model to main.

view this post on Zulip Wasmtime GitHub notifications bot (May 19 2022 at 19:13):

alexcrichton has marked PR #4005 as ready for review.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2022 at 20:19):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2022 at 20:33):

alexcrichton merged PR #4005.


Last updated: Dec 23 2024 at 12:05 UTC