bytecodealliance / bytecodealliance/wasmtime
Allow slices of more types than `u8` in wiggle
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
#### 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`.
Contributor guide
Assessment
This issue has not been assessed yet.