-
Hi, I have some new questions.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes and no. ZeroCopyBuffer is implemented by Dart primitives, which only support a flat byte array. But, if you generate some Dart code like:
Then I guess it should work.
I am worried that this may violate the memory model of Rust very easily. For example, you can modify the bytes in Dart and Rust at the same time. However, there can be fancier approaches. Possibly related: #1132 |
Beta Was this translation helpful? Give feedback.
-
Okay, thank you very much for the help! |
Beta Was this translation helpful? Give feedback.
Yes and no.
ZeroCopyBuffer is implemented by Dart primitives, which only support a flat byte array.
But, if you generate some Dart code like:
Then I guess it should work.
I am worried that this may violate the memory model of Rust very easily. For example, you can modify the bytes in Dart and Rust at the same time.
H…