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
I'm working on a y-crdt port to Dart (https://github.com/britannio/y_dart) but the lack of an origin in observe callbacks makes it more challenging to implement bindings for storage and text editing.
Most of the observe callbacks come with TransactionMut as one of the callback parameters. Have you tried to call TransactionMut::origin?
The function I introduced uses TransactionMut::origin and converts it to (*const c_char, u32) which can be passed over ffi to Dart.
Another solution would be to pass the transaction to the callback and introduce a ffi (extern C) function to convert *TransactionMut to (*const c_char, u32) with the origin data but that requires extra calls over the ffi boundary.
I'm working on a y-crdt port to Dart (https://github.com/britannio/y_dart) but the lack of an origin in observe callbacks makes it more challenging to implement bindings for storage and text editing.
My current solution introduces a
transaction_origin_data()
function copied fromYUndoEvent.new
https://github.com/britannio/y_dart/blob/044c6d5f1022fcbbe7d21d342297fa24a07645a6/rust/src/lib.rs#L510-L544
The text was updated successfully, but these errors were encountered: