ruma / lb

Ruma wrapper for low-bandwidth matrix
MIT License
2 stars 0 forks source link

Sync API? #4

Open ShadowJonathan opened 2 years ago

ShadowJonathan commented 2 years ago

Ironically, with the sparse state of COAP in Rust, it might be easier to implement an async version of COAP handlers.

However, I can imagine for consumers of the API, such as Element, matrix-rust-sdk, or other mobile clients, it might be easier to embed a synchronous API when interfacing with via FFI.

So the question becomes; how to implement that? How to expose interfaces? Should a whole sub-crate be dedicated to this, or should async APIs offer a sync version? How would this interact with mixed async/sync calls?

ShadowJonathan commented 2 years ago

I was mostly looking at coap, though i think that with coap-lite, a simple synchronous API is easier at this stage, and i'm then inclined to put async behind a crate feature flag.