Expose controller layer from the crate
In order to enable direct consumption of vdr-tools from other Rust crate, I am proposing this PR to:
- expose Controller layer to represent Rust API of the crate, service layer stays invisible for the consumer
- additionally it's also needed to expose
domain
module for datastructures andutils
mainly for logger. Theutils
module could be perhaps split in 2, something likeutils
(crate api,pub
), andutils_internal
(private to crate;pub(crate)
) - This would also enable writing unit tests against the
rust
api, instead of testing through FFI api - so experimentally I've createdlibindy/tests/ledger_service.rs
as example. This would be more pragmatic and convenient approach, but on the other hand it doesn't verify the C-layer (which is maybe desirable property for you). - Example project using this vdr-tools Rust API via crate dependency https://github.com/Patrik-Stas/consume-indy-crate/blob/master/src/libindy_async.rs
Let me know what you think.
Signed-off-by: Patrik Stas patrik.stas@absa.africa
Merge request reports
Activity
Filter activity
Please register or sign in to reply