Skip to content

Improve the layout of crate exports; add runtime convenience functions

eta requested to merge eta/arti:eta/182 into main

This commit addresses multiple problems highlighted by #182 (closed):

  • arti-client had some types in its public API that weren't accessible without importing another crate (CfgPath, DataReader, DataWriter). This has been fixed.
    • In addition, the doc comments for DataReader and DataWriter were cleaned up to be of better quality, now that they're public.
  • It was impossible to use arti-client without also importing tor-rtcompat. This is now fixed by the addition of two convenience methods: TorClient::bootstrap_with_tokio and TorClient::bootstrap_with_async_std.
  • Potentially controversially: tor-rtcompat now returns concrete types from methods like current_runtime, instead of impl Runtime.
    • This was needed in order to actually be able to name the TorClient type that results from using these methods.
    • This does mean we lose API flexibility, but on balance I think this is a good thing, because the API we do have is actually usable...

Merge request reports

Loading