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
We has always wanted to expose bindings under edgedb crate instead of the edgedb-tokio/whatever. But the structure of that is not very clear. Here is a sketch of my current thinking.
Expose edgedb::model, edgedb::error, and whatever is needed for derive macros.
Feature tokio: exposes edgedb::tokio
Feature blocking: exposes edgedb::blocking (which probably a blocking wrapper around tokio)
We might have default-tokio and default-blocking client which expose respective clients to the top-level namespace edgedb::tokio::Client -> edgedb::client, edgedb::blocking::Client -> edgedb::Client.
Potentically async-std/glommio or whatever new runtime can be done via it's own crate and brought here via feature flag. Also blocking implementation that doesn't depend on tokio could be implemented in the future too.
Ideally when async traits arrive to the stable Rust here is how it should work:
There is an edgedb-async crate which contains traits for executing queries
Libraries (which are not end-user apps) depend on edgedb-model and edgedb-async, but not edgedb crate (it's unclear how that would work with edgedb-derive, though).
When we bump major version of edgedb only app could be updated
When we bump major version of edgedb-model and edgedb-async we do adapters that allow libraries using older versions to work (i.e. transform to new types, see log crate for an inspiration)
But I'm not sure whether this is practical enough, and/or when this will become practical.
The text was updated successfully, but these errors were encountered:
We has always wanted to expose bindings under
edgedb
crate instead of theedgedb-tokio/whatever
. But the structure of that is not very clear. Here is a sketch of my current thinking.edgedb::model
,edgedb::error
, and whatever is needed for derive macros.tokio
: exposesedgedb::tokio
blocking
: exposesedgedb::blocking
(which probably a blocking wrapper around tokio)default-tokio
anddefault-blocking
client which expose respective clients to the top-level namespaceedgedb::tokio::Client -> edgedb::client
,edgedb::blocking::Client -> edgedb::Client
.Ideally when async traits arrive to the stable Rust here is how it should work:
edgedb-async
crate which contains traits for executing queriesedgedb-model
andedgedb-async
, but notedgedb
crate (it's unclear how that would work withedgedb-derive
, though).edgedb
only app could be updatededgedb-model
andedgedb-async
we do adapters that allow libraries using older versions to work (i.e. transform to new types, seelog
crate for an inspiration)But I'm not sure whether this is practical enough, and/or when this will become practical.
The text was updated successfully, but these errors were encountered: