Stream: git-wasmtime

Topic: wasmtime / PR #10462 Generalize `VMGcObjectDataMut` for i...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 22:50):

fitzgen requested wasmtime-core-reviewers for a review on PR #10462.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 22:50):

fitzgen requested pchickey for a review on PR #10462.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 22:50):

fitzgen opened PR #10462 from fitzgen:generalize-vm-gc-object-data to bytecodealliance:main:

Depends on https://github.com/bytecodealliance/wasmtime/pull/10461

This makes it generic over a T and then shared+immutable accesses are bound by
T: AsRef<[u8]> and exclusive+mutable accesses are bound by T: AsMut<[u8]>.

This allows reusing these accessors in more places in the future, and means
there are fewer places to bounds check accesses and remember to do little-endian
conversion and all that.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:26):

fitzgen updated PR #10462.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:37):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:37):

alexcrichton created PR review comment:

Style nit: &'_ T I think can always be rewritten as &T

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:37):

alexcrichton created PR review comment:

If you want to get really fancy one option is to define this as VmGcObjectData([u8]) to avoid needing generics here at all.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:44):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:44):

fitzgen created PR review comment:

Then we need unsafe code to construct it tho, because we can't use the unbox feature, right?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:45):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:45):

fitzgen created PR review comment:

I thought that underscores were preferred for elided return lifetimes these days?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:47):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:47):

alexcrichton created PR review comment:

I think that's advice for lifetime parameters because Foo is equivalent to Foo<'_>, but with Foo it's easy to forget there's a lifetime in there. With &T vs &'_ T though it's mostly just visual noise

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:47):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 24 2025 at 23:47):

alexcrichton created PR review comment:

Right yeah, we'd have to have a transmute for that (but IMO is reasonable, nothing compared to the other unsafe bits we have)

view this post on Zulip Wasmtime GitHub notifications bot (Mar 25 2025 at 00:11):

fitzgen updated PR #10462.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 25 2025 at 00:23):

fitzgen updated PR #10462.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 25 2025 at 00:23):

fitzgen has enabled auto merge for PR #10462.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 25 2025 at 01:00):

fitzgen merged PR #10462.


Last updated: Apr 17 2025 at 10:03 UTC