Elektrine lite

← Feed

@kevinmehall@hachyderm.io

Post #1953783

2026-04-20 06:29 UTC

@r It would definitely be doable on top of nusb (except pieces like isochronous I just haven't gotten to yet), but the nusb API is a bit opinionated in places like owned Endpoint objects and transfer queuing that are a bit of an impedance mismatch with things like this or USBIP that want to transparently expose arbitrary transfers on all endpoints.

Replies (2)

  • @r@glauca.space 2026-04-20 06:32

    @kevinmehall fair enough, i should ~eventually~ re-study nusb and compare notes there's _lots_ of weird impedance mismatches in all sorts of places when dealing with USB (see e.g. windows and composite device 🙀) something that i also want to see in future rust apis is some way of dealing with OS optimization tricks (e.g. LowLatencyReadIsochPipeAsync on macos, zerocopy mmap on linux)

    Open ##1953784

  • @kevinmehall@hachyderm.io 2026-04-20 06:38

    @r I don't think Rust's form of async and what I had to do to shove completion-based IO into it is necessarily a bad thing for high-level usage in Rust, but it's further from what WebUSB wants in JS, so I see why you went that route.

    Open ##1953786