Stream: git-wasmtime

Topic: wasmtime / issue #9319 Allow slices of more types than `u...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 26 2024 at 23:46):

elliottt opened issue #9319:

Feature

The GuestMemory::as_slice method should allow slices of types other than u8 to be constructed. It's currently possible to work around this by using the GuestMemory::to_vec method, which is appropriately parameterized, but it would be nice to read slices of types like u32 without having to copy all the values back into the host.

Benefit

This change woudl result in a slight memory savings for cases where you don't need the entire vector to be present in host memory.

Alternatives

We can certainly leave things as they are, as it's always possible to fall back on GuestMemory::to_vec.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 26 2024 at 23:47):

elliottt added the wiggle label to Issue #9319.


Last updated: Nov 22 2024 at 17:03 UTC