Open Ekleog-NEAR opened 7 months ago
I don't think we ever want to worry about future use-cases we might want to support before removing wasmer cruft.
The reason is simple -- that cruft, even if it does apply, will not fit quite right (as a rule of thumb). Trying to rationalize keeping it is throwing out our precious now-time (in both rationalization and maintenance) in hopes that we'll be able to expend slightly less future-time in trying to take advantage of what we'll have spent a bunch of effort by that point.
Currently, we store the VMMemoryDefinition in either the
Instance
or theLinearMemory
instance. This separation sounds most likely wrong to me: we should most likely be able to simplify code by literally always having the memory definition owned by theInstance
.Also, we might be able to get rid of
HostOwned
altogether: AFAICT our contracts all only rely on exported memories, so we should never be touching theVMMemoryDefinitionOwnership::HostOwned
code path. But before doing that, we should think about it and make sure that we do not plan on supporting any wasm extension that would require it, like the components one maybe?Related to #11033