Stream: git-wasmtime

Topic: wasmtime / issue #11179 Management of tables in Wasmtime ...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 03 2025 at 20:59):

alexcrichton opened issue #11179:

The current management of crate::runtime::vm::Table is excessively unsafe in the context of crate::runtime::vm::Instance in particular at this time. We should clean this up and make this safer.

Some examples of this pattern are:

It may not be possible to remove all of this unsafe, but much of this is just trying to juggle ownership and it should in theory be possible to do better. A rough idea of how to handle this would be to use wasmtime::Table more frequently. This is effectively an "indexed based approach" rather than a pointer-based approach. That won't be a silver bullet due to various borrowing requirements (e.g. accessing imported tables) but might be able to help quite a lot. Regardless I think we can do much better than what we're currently doing today.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 03 2025 at 20:59):

alexcrichton added the wasmtime:unsafe-code label to Issue #11179.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 21:58):

alexcrichton edited issue #11179:

The current management of crate::runtime::vm::Table is excessively unsafe in the context of crate::runtime::vm::Instance in particular at this time. We should clean this up and make this safer.

Some examples of this pattern are:

It may not be possible to remove all of this unsafe, but much of this is just trying to juggle ownership and it should in theory be possible to do better. A rough idea of how to handle this would be to use wasmtime::Table more frequently. This is effectively an "indexed based approach" rather than a pointer-based approach. That won't be a silver bullet due to various borrowing requirements (e.g. accessing imported tables) but might be able to help quite a lot. Regardless I think we can do much better than what we're currently doing today.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 21:58):

alexcrichton edited issue #11179:

The current management of crate::runtime::vm::Table is excessively unsafe in the context of crate::runtime::vm::Instance in particular at this time. We should clean this up and make this safer.

Some examples of this pattern are:

It may not be possible to remove all of this unsafe, but much of this is just trying to juggle ownership and it should in theory be possible to do better. A rough idea of how to handle this would be to use wasmtime::Table more frequently. This is effectively an "indexed based approach" rather than a pointer-based approach. That won't be a silver bullet due to various borrowing requirements (e.g. accessing imported tables) but might be able to help quite a lot. Regardless I think we can do much better than what we're currently doing today.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 21:58):

alexcrichton edited issue #11179:

The current management of crate::runtime::vm::Table is excessively unsafe in the context of crate::runtime::vm::Instance in particular at this time. We should clean this up and make this safer.

Some examples of this pattern are:

It may not be possible to remove all of this unsafe, but much of this is just trying to juggle ownership and it should in theory be possible to do better. A rough idea of how to handle this would be to use wasmtime::Table more frequently. This is effectively an "indexed based approach" rather than a pointer-based approach. That won't be a silver bullet due to various borrowing requirements (e.g. accessing imported tables) but might be able to help quite a lot. Regardless I think we can do much better than what we're currently doing today.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 16 2025 at 22:12):

alexcrichton edited issue #11179:

The current management of crate::runtime::vm::Table is excessively unsafe in the context of crate::runtime::vm::Instance in particular at this time. We should clean this up and make this safer.

Some examples of this pattern are:

It may not be possible to remove all of this unsafe, but much of this is just trying to juggle ownership and it should in theory be possible to do better. A rough idea of how to handle this would be to use wasmtime::Table more frequently. This is effectively an "indexed based approach" rather than a pointer-based approach. That won't be a silver bullet due to various borrowing requirements (e.g. accessing imported tables) but might be able to help quite a lot. Regardless I think we can do much better than what we're currently doing today.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 17 2025 at 17:40):

alexcrichton closed issue #11179:

The current management of crate::runtime::vm::Table is excessively unsafe in the context of crate::runtime::vm::Instance in particular at this time. We should clean this up and make this safer.

Some examples of this pattern are:

It may not be possible to remove all of this unsafe, but much of this is just trying to juggle ownership and it should in theory be possible to do better. A rough idea of how to handle this would be to use wasmtime::Table more frequently. This is effectively an "indexed based approach" rather than a pointer-based approach. That won't be a silver bullet due to various borrowing requirements (e.g. accessing imported tables) but might be able to help quite a lot. Regardless I think we can do much better than what we're currently doing today.


Last updated: Dec 06 2025 at 07:03 UTC