You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe this isn't the way to pass references across the ffi boundary, but say we have a rust defined struct which has been crossed over to dart, say List<RustType>, if we wanted to modify that type by taking a &mut [RustType] in rust. In Flutter, the corresponding type in the function declaration would be RustType which isn't completely correct.
Similarily, on the other side, if we wanted to return a &str from rust into flutter, we would have to clone the string in order to send it across the ffi boundary, since the trait SSeEncode is not implemented for &str.
Having to send owned variants across FFI is a way to bypass this, but I think that being able to pass references would be a much better option (aside from issues that may arise from lifetimes).
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
Maybe this isn't the way to pass references across the ffi boundary, but say we have a rust defined struct which has been crossed over to dart, say
List<RustType>
, if we wanted to modify that type by taking a&mut [RustType]
in rust. In Flutter, the corresponding type in the function declaration would beRustType
which isn't completely correct.Similarily, on the other side, if we wanted to return a &str from rust into flutter, we would have to clone the string in order to send it across the ffi boundary, since
the trait SSeEncode is not implemented for &str
.Having to send owned variants across FFI is a way to bypass this, but I think that being able to pass references would be a much better option (aside from issues that may arise from lifetimes).
The text was updated successfully, but these errors were encountered: