icann / icann-rdap

ICANN implementation of the Registry Data Access Protocol (RDAP)
Apache License 2.0
15 stars 4 forks source link

adding Send+Sync supertraits to BootstrapStore for smoother async exp… #73

Closed yannduperis closed 2 months ago

yannduperis commented 2 months ago

I tried using the library in an async context (in a Tauri app within a #[tauri:command]) and went through hell because the compiler complained BootstrapStore doesn't implement Send.

I trivially modified the trait and its implementation (MemoryBootstrapStore) to implement both Send and Sync.

It works in my app and passes unit-tests.

anewton1998 commented 2 months ago

FYI, if you are building a client (which it sounds like you are doing), you may want to ask to get it listed in the RDAP Guide.

Thanks for the PR and if you have any other suggestions or ideas, please feel free to submit them.