Looking at the Library API docs on docs.rs, I'm thinking we should re-organize the public-facing interfaces. A few specific thoughts below:
Anything that is CLI-specific should probably be moved out of the library. For example, we don't need to have CliConfig there.
I don't think we need the client submodule - instead, we could re-export some of the sub-modules of client at the root level.
In general, we might want to consider a more flat crate organization (in some cases, we have sub-modules with just 1 or 2 components). This does not mean we should change the internal organization - only how things are exported publicly.
a. For example, we could have the following modules re-exported from the root: config, errors, rpc, state_sync, store, transactions. And everything else would be either in these modules or at the root level.
We may need to make StoreConfig into an associated type of the Store trait. This is because various store implementations may have different configuration settings.
We should probably create features for controlling exports of various specific trait implementations. For example, we could have sqlite feature which needs to be enabled to export SqliteStore. Similarly, we could have tonic feature for controlling the export of TonicRpcClient.
We should clean up publicly exposed features. For example, I'm not sure if test_utils and uuid need to be stand-alone features.
a. Separately, shouldn't concurrent imply std?
Looking at the Library API docs on docs.rs, I'm thinking we should re-organize the public-facing interfaces. A few specific thoughts below:
client
submodule - instead, we could re-export some of the sub-modules ofclient
at the root level.config
,errors
,rpc
,state_sync
,store
,transactions
. And everything else would be either in these modules or at the root level.StoreConfig
into an associated type of theStore
trait. This is because various store implementations may have different configuration settings.sqlite
feature which needs to be enabled to exportSqliteStore
. Similarly, we could havetonic
feature for controlling the export ofTonicRpcClient
.test_utils
anduuid
need to be stand-alone features. a. Separately, shouldn'tconcurrent
implystd
?