As a part of the effort to enable scripting in shipyard, I was curious if anybody has ever written/used a crate that has a Vec-like struct that can be used to allocate things in contiguous memory, but that allows you to specify the size of the items at runtime, because I have no way of knowing the size at compile time.
I essentially need a Vec that I can store byte arrays of an arbitrary size in, so instead of running Vec::new() I would run Vec::new(size) and it would allow me to shove byte arrays/slices into the vec as long as they were size long.
Ooh, I just found scroll which looks really promising.
@leudz Any thoughts on it. It looks like we could store custom components in a Vec<u8> and then use scroll to read and write the custom bytes to/from it.
Edit: actually maybe I'm just shooting in the dark again without fully understanding the needs for the project. I think I'm jumping the gun a little. I'll probably come back to this once I understand the problem a little better.