Phil Dennis-Jordan š· on Nostr: Rustaceans! C++ people! I need to implement a fairly complicated and somewhat ...
Rustaceans! C++ people! I need to implement a fairly complicated and somewhat stateful and overlapping USB protocol. macOS user space. This means IOUSBLib, which in its raw form is callback hell. (Multiple pipes with requests pending simultaneously, so ājust turn it into blocking codeā is going to be even worse.) Possible approaches:
- Wrapping the C callback void* API with C++ coroutines.
- Build the whole thing in async Rust.
Any thoughts? No libraries/frameworks with high churn.
Published at
2024-07-22 09:02:31Event JSON
{
"id": "35205ec56bf8dd8d7f0f46161a71c6807bbfa44036dd45a53c3484927d47d79e",
"pubkey": "6344cd9eea14e5aa399d086ccdca5775b156c4ae2d504c01f024fda50455f82a",
"created_at": 1721638951,
"kind": 1,
"tags": [
[
"proxy",
"https://mstdn.social/users/pmdj/statuses/112829330355886473",
"activitypub"
]
],
"content": "Rustaceans! C++ people! I need to implement a fairly complicated and somewhat stateful and overlapping USB protocol. macOS user space. This means IOUSBLib, which in its raw form is callback hell. (Multiple pipes with requests pending simultaneously, so ājust turn it into blocking codeā is going to be even worse.) Possible approaches:\n- Wrapping the C callback void* API with C++ coroutines.\n- Build the whole thing in async Rust.\nAny thoughts? No libraries/frameworks with high churn.",
"sig": "79b62fa5f1da88eb2728d193deb66f1be838c3169413796ba059f83c6d1bf92a80c239a871150bf24a26333367f8cd2d37a1518a643dc6386cb7550a70fd6239"
}