Ji-Xinyou commented on PR #1892:
URL: 
https://github.com/apache/incubator-opendal/pull/1892#issuecomment-1501747742

   > We want binding to be like a native library. We may shouldn't add 
primitive types like Vec.
   
   This only expose a **pointer to vector**. And all APIs are exposed by us.
   
   If we do not expose types like `Vec`, and only use `data+len` way, we are 
going to face following problems.
   * The biggest problem is that the `opendal_bytes` will be extremely 
constraint, meaning that the user cannot operate further on this contiguous 
memory space, the only operation on `opendal_bytes` will be `read` and 
`truncate`.
   * We can not utilize the Rust optimization on `Vec`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to