WebAssembly / wasi-blobstore

15 stars 11 forks source link

Define `get-data` behaviour if `start` or `end` is past the end of the blob #31

Open itowlson opened 1 month ago

itowlson commented 1 month ago

end

I assume that a lot of get-data users will want to get the whole blob, and I assume this is done by passing start = 0, end = u64::MAX, so I assume that an end beyond the length of the blob is okay and we just return as much as exists.

But that feels like a lot of assuming and it would be good to see it specified.

start

If start is past the end of the blob, do the incoming-value functions return an empty list/stream, or is that an error? If an error, is it reported at get-data time, or when an incoming-value function is called, or (in the async case) when the input-stream is first read?