Commit graph

3 commits

Author SHA1 Message Date
Emily Toop
bda1ec4d0a Add simple transact string to FFI.
Rename ExternTxReport and ExternTxReportList to distinguish between TxReport from transact and the results of a transaction observer firing.

Move to use c_longlong instead of i64 and time_t as Android and iOS provide different sizes.

Use to_string instead of description for errors as they are more descriptive.

Pass UUID values as bytes rather than strings

Remove unused FFI functions (functionality has been removed)

Handle optional results better - return null if optional is None

Return boolean as integer value rather than bool as Swift can't handle them.

When returning values from an iterator, make sure we don't release the value at the end of the Rust function leaving a dangling pointer.
2018-05-14 11:53:49 +01:00
Emily Toop
fa7dd2ceab Add FFI for query building 2018-04-06 10:46:15 +01:00
Emily Toop
9f30fe6295 Create Mentat FFI and expose observers (#574)
* Tidy up and add txid at beginning of transaction

* Add ffi crate and new_store function

* Add register and unregister observer FFI, Store and Conn functions.
Also add android logging facilities

* Add function for fetching entids for attribute strings

* Add functions for iterating through TxReports

* Add sync to ffi boundary

* Move Extern types from submodule to lib in FFI.
For some reason, if these types are in a submodule, even if they are publically used, the functions inside the FFI are not found in
Android. Works for iOS though. To be investigated later....

* Return to passing TxReports to observer function.
Also, remove some debug

* Expose DateTime and Utc publically

* Use Store in observer tests
2018-03-20 19:16:32 +00:00