alexcrichton commented on issue #3291:
It's worth pointing out that one refactoring I actually tried out was "what if we used
Pin<Box<StoreInner<T>>>? I actually got pretty far with this but there's a few reasons that I didn't commit to it:
Primarily, I don't think
Pinis the right abstraction. My goal is to represent how when you havePin<&mut StoreInner<T>>orPin<&mut StoreOpaque>you have to be careful about accessing the contents and not overwrite the entire structure. I misunderstood the guarantees ofPin, though. ThePin::setmethod is safe and allows, at any time, overwriting the contents of the pinned pointer. That means that whatever gymnastics we go through to usePindoesn't actually provide us any more safety since it's still possibly to safely cause bad behavior.Otherwise
Pinwas primarily pretty unergonomic. The main point against it was that, as we do today, we are required to manually reborrowPinevery time it's passed around and used twice.So basically the ergonomic drop plus not actually providing much benefit led me to the conclusion that we simply need to continue to be vigilant within Wasmtime to do the right thing. We do still need the
PhantomPinned, though, I think. I'm at least somewhat sure that we can't be marking all our pointers asnoaliaswith all the aliasing we actually have...
github-actions[bot] commented on issue #3291:
Subscribe to Label Action
cc @peterhuene
<details>
This issue or pull request has been labeled: "wasmtime:api"Thus the following users have been cc'd because of the following labels:
- peterhuene: wasmtime:api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
Last updated: Dec 06 2025 at 06:05 UTC