There are a few cases where we'll have buffers that need to take lots of reads/writes, and are not in linear memory.
Examples include gpu-buffer
when mapped to CPU, and frame-buffers.
How should we go about those?
Here are some options I've thought of, none of them seem particularly good to me:
- Just copy everything over as
list<u8>
. Obviously slow.
- Have an external resource, with
.get()
/.set()
methods. Prob slow since every .get()
/.set()
will have to cross the wasm boundary, but might still be best option with current capabilities.
- Find some magic way to map it to linear memory. Don't think this is actually possible.
Thoughts anyone?