Skip to content

Interest in exposing nusb::transfer::Queue #2

@TroyNeubauer

Description

@TroyNeubauer

Thanks for your work on cross-usb!

I was curious if you would be interested in a PR to expose nusb::transer::Queue to enable unlock the bus saturation that multiple concurrent transfers brings on native.

I'm imagining that this would look like:

  1. Expose an async Queue interface that looks very similar to nusb's
  2. On native these functions would dispatch directly to nusb
  3. On the web, looks like there's no equivalent API to perform async transfers with multiple buffers, so implement using the existing one at a time functions

Motivation

Especially in the context of SDR, samples are coming in quickly and saturating the bus is a must. In the case of HackRF, even using a long cable can cause issues! https://hackrf.readthedocs.io/en/latest/usb_cables.html

We are close to merging a rust-native hackrf driver into seify to remove our libusb / soapy cpp dependencies. FutureSdr has good support for Wasm, and exposing this interface would allow us to use the same driver across native and web
See: FutureSDR/seify#9 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions