dap-rs icon indicating copy to clipboard operation
dap-rs copied to clipboard

Tokio support

Open nuid64 opened this issue 1 year ago • 1 comments

I'm enjoying this library. Really nice work. It would be very convenient to use dap-rs in my project. But I faced with a problem of lack of support of tokio library. I can't imagine program which interact with a think like debug adapter synchronously, so this is real problem to me. As I understand, making Server's BufReader and BufWriter accept AsyncBufRead and AsyncWrite traits implementators, making some functions async, and, maybe, deriving Send on some structures would be enough, but this is just guess at a glance. I'd be glad to help implementing this.

nuid64 avatar Aug 02 '23 06:08 nuid64

Initially I started writing the library with async code. However, I found that it complicates the interface a lot and I thought the performance gains to be irrelevant. Now the interface is vastly simplified so maybe it makes sense to take another stab at it. Maybe a separate async interface could be provided that is optional to use. I still think the complexity might not be worth it, but if you are interested in prototyping it, I'll give it an honest chance.

sztomi avatar Aug 03 '23 18:08 sztomi