uniffi-rs
uniffi-rs copied to clipboard
uniffi should pass sequence arguments as slices
Right now uniffi will call Rust using owned vectors, which isn't super idiomatic, we should special case this and pass &[T]
instead.
┆Issue is synchronized with this Jira Task ┆Issue Number: UNIFFI-14
That sounds great! We could always add an Owned
or ByVal
(to match ByRef
) annotation or something if a Rust function needs to take ownership of the sequence and calling .clone()
is too expensive. But &[T]
sounds perfect for the default.
Any progress on this?
[ByRef] sequence<T>
in argument position in the UDL works as expected.