Stream: git-wasmtime

Topic: wasmtime / PR #15191 GC: implement `Unrooted` references.


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

cfallin edited PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 11 2026 at 07:17):

cfallin updated PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:thumbs_up: fitzgen submitted PR review:

Thanks! LGTM modulo a bunch of nitpicks

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_ suffix here as well

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_-suffix instead of prefix:

    pub(crate) fn to_unrooted_(&self, store: &StoreOpaque) -> Result<crate::Unrooted<T>> {

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

For this and the non-owned Rooted version: does it make sense for callers to pass in an &mut Vec<_> that we push onto so they can reuse an allocation if they have one handy?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

We intentionally do not implement Eq/PartialEq for Rooted because it isn't clear what the correct thing to do is: reference equality or Wasm semantics-level equality (which is only valid for eqref subtypes). Instead we have Rooted::ref_eq and also Rooted::rooted_eq. Also Rooted::ref_hash for hashing.

We should do the same for Unrooted.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Let's maybe not include "weak" here, and just say "In exchange, ..." because otherwise we are potentially misleading people into thinking that this is a weak reference that remains valid as the referent is alive (regardless whether we have GC'd since the reference was taken, or relocated the object, etc...)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

And then here I would skip the first sentence, and make the paragraph dedicated only to the idiom/convention of returning Unrooted references.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_ suffix instead of prefix

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Can we reuse wasmtime::I31 for this payload, instead of open-coding a bunch of new i31 stuff?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

I don't think we need to discuss the internals/implementation here either. I think it is fine to just say something like

In exchange, because Unrooted references are not recorded in the root set, they can be used in non-mut Store contexts and operations on them are very cheap.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

And unchecked_to_rooted or to_rooted_unchecked here?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Document that the returned Val is not rooted as well?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

ditto

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_ suffix instead of prefix

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

This method name sounds like it is prevalidating the GC ref and returning it. Maybe unchecked_gc_ref?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Ditto regarding documenting unrootedness.

Also, can this return an impl ExactSizeIterator<Item = Val> instead of a Vec<_> like StructRef::fields` does?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Ditto regarding documenting unrootedness

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Ditto regarding documenting unrootedness

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Ditto regarding documenting unrootedness and ExactSizeIterator

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Maybe also #[track_caller]. (And similar for unwrap_rooted -- should have caught that in the first PR)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_ suffix instead of prefix

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

This doesn't seem necessary to put in the doc comment

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_ suffix instead of prefix

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_ suffix instead of prefix

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

_ suffix instead of prefix

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Ditto regarding "unchecked" instead of "prevalidated"

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Can we also assert the size and align are the same, which LLVM should trivially boil away, just for extra future proofing?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Maybe exhaustive so we don't forget new kinds of references? E.g continuation refs, which are omitted here now but will need to be handled in the future

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

ditto

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

I might be missing it, but I think we need these conversions for EqRef too

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Should this take vals: impl IntoIterator<&mut Val> to be more general and work with other collections?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2026 at 19:21):

:speech_balloon: fitzgen created PR review comment:

Ditto

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 00:52):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 00:52):

:speech_balloon: cfallin created PR review comment:

Unfortunately it can't be: it has to make two passes, the first one to validate all values (they could be stale unrooted values) and only then the second to root them all.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 00:55):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 00:55):

:speech_balloon: cfallin created PR review comment:

Unfortunately we can't: we need to be able to return a borrow of a VMGcRef, which we do with the unsafe cast below, and that won't work if we use a wasmtime::I31 instead.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:02):

cfallin updated PR #15191.

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Yep, good idea -- done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Updated!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:04):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:04):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:04):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:04):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Removed!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:05):

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

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

:memo: cfallin submitted PR review.

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

:speech_balloon: cfallin created PR review comment:

Done!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:07):

:memo: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:07):

:speech_balloon: cfallin created PR review comment:

Added!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:07):

cfallin has enabled auto merge for PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:20):

cfallin has disabled auto merge for PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:22):

cfallin updated PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:22):

cfallin has enabled auto merge for PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 01:40):

cfallin added PR #15191 GC: implement Unrooted references. to the merge queue

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

github-merge-queue[bot] removed PR #15191 GC: implement Unrooted references. from the merge queue

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

cfallin updated PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 04:17):

cfallin updated PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 04:20):

cfallin has enabled auto merge for PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 04:32):

cfallin added PR #15191 GC: implement Unrooted references. to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 04:54):

github-merge-queue[bot] removed PR #15191 GC: implement Unrooted references. from the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 04:59):

cfallin updated PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 04:59):

cfallin has enabled auto merge for PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 05:18):

cfallin added PR #15191 GC: implement Unrooted references. to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 05:41):

:check: cfallin merged PR #15191.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2026 at 05:41):

cfallin removed PR #15191 GC: implement Unrooted references. from the merge queue


Last updated: Nov 19 2026 at 20:05 UTC