My aim is to pass a string representation of the system to rust, and rust will return a zero-copy buffer of geometry primitives which will be rendered in JS. It seems that the best way to do this is with
Uint8Array::view. This method has a few unsafety caveats which make sense, except for the following:
Finally, the returned object is disconnected from the input slice’s lifetime, so there’s no guarantee that the data is read at the right time.
What exactly does this mean? Is this referring to the situation where the input slice is dropped before the JS actually receives the
Uint8Array? Or is there another way for the data to be read at the "wrong" time?