Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 6, 2025

Bumps nusb from 0.1.10 to 0.2.1.

Release notes

Sourced from nusb's releases.

v0.2.1

Bug fixes

  • Fix a race condition where Interface::endpoint would return Busy when re-opening an endpoint that was just dropped immediately after a previous transfer completed (kevinmehall/nusb#163)

New features

  • Add Endpoint::transfer_blocking convenience method to submit and wait for a single transfer with timeout (kevinmehall/nusb#164)

Contributors

@​kevinmehall

v0.2.0

v0.2 is an API redesign based on what we learned in v0.1. It makes the API less error prone, enables new optimizations, and prepares the API for a planned WebUSB backend.

New Features

  • EndpointRead / EndpointWrite adapters that manage transfers and implement std::io and corresponding async IO traits. These are now the "high-level" API recommended unless you want to manage individual transfers. (kevinmehall/nusb#141)
  • Functions that were previously blocking are available as blocking or async via MaybeFuture. If you are using them asynchronously, you need to enable the smol or tokio features to defer the blocking syscalls to the corresponding runtime's blocking thread pool. (kevinmehall/nusb#100)
  • Add DeviceInfo::port_chain with the path of port numbers from the root hub to this device. (kevinmehall/nusb#71)
  • Add list_buses() and BusInfo for information on USB buses. (kevinmehall/nusb#77)
  • Include error code in TransferError::Unknown. (kevinmehall/nusb#64)
  • Add Device::device_descriptor for access to device details from an opened device. (kevinmehall/nusb#102)
  • Windows: Enable RAW_IO for bulk IN endpoints for improved performance. (kevinmehall/nusb#6)
  • Linux: Enable zero-copy IO with buffers allocated by Endpoint::allocate. (kevinmehall/nusb#11)

Fixes

  • Windows: Allow claiming associated interfaces of multi-interface functions.
  • Windows: List interfaces of composite devices that are bound to WinUSB at the device level.
  • Windows: Include hubs in the device list. (kevinmehall/nusb#85)

Breaking Changes

  • list_devices DeviceInfo::open, Device::from_fd, Device::set_configuration, Device::reset, Interface::set_alt_setting, Device::claim_interface Device::detach_and_claim_interface, and Endpoint::clear_halt now return impl MaybeFuture. Add use nusb::MaybeFuture and call .wait() for previous blocking functionality. Or, to use them from async code, enable the tokio or smol cargo feature of nusb and use .await.
  • Queue has been replaced by Endpoint with changes to the buffer type. (kevinmehall/nusb#117)
  • Interface methods for single bulk and interrupt transfers and TransferFuture have been removed because they had subtle pitfalls regarding cancellation. Use Endpoint::submit followed by next_complete, or switch to the EndpointRead / EndpointWrite adapters.
  • Interface and Device methods control_in_blocking + control_out_blocking have been replaced with control_in / control_out with .wait() from MaybeFuture.
  • Interface and Device methods control_in + control_out now accept a timeout. Dropping the returned Future no longer cancels the transfer.
  • Bulk and Interrupt IN transfers that are not a multiple of the max packet size return an error. (kevinmehall/nusb#135)
  • DeviceInfo::bus_number (integer) has been replaced with DeviceInfo::bus_id (string).
  • Renamed EndpointType to TransferType.
  • Renamed descriptor types (kevinmehall/nusb#115)
  • Use NonZeroU8 for string descriptor indexes.
  • Descriptor constructors return Option instead of panic.
  • TransferError::Unknown has an integer field for the error code.
  • nusb::Error is now a custom error type instead of a re-export of std::io::Error. It still implements Into<std::io::Error> for ?.
  • Linux: Root hubs are no longer included in the device list.

Minimum Rust version is now 1.79.

Contributors

... (truncated)

Commits
  • 318244f v0.2.1
  • 86f692e Add crates.io trusted publishing
  • 63ffb27 Merge pull request #164 from kevinmehall/transfer-blocking
  • dd56a96 Add Endpoint::transfer_blocking convenience method.
  • abb3740 Merge pull request #163 from kevinmehall/waker-fix
  • 61228ae Log on dropping endpoint with pending transfers
  • bcfb2b8 Take waker and drop EndpointInner reference before waking transfer
  • 573126d Fix "hiding a lifetime that's elided elsewhere is confusing" warnings from ru...
  • 2ef7969 v0.2.0
  • 0035edd Add must_use to MaybeFuture
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Oct 6, 2025
@dependabot dependabot bot mentioned this pull request Oct 6, 2025
@dependabot dependabot bot force-pushed the dependabot/cargo/nusb-0.2.1 branch from ba8484f to df853d0 Compare October 24, 2025 22:06
Bumps [nusb](https://github.com/kevinmehall/nusb) from 0.1.10 to 0.2.1.
- [Release notes](https://github.com/kevinmehall/nusb/releases)
- [Commits](kevinmehall/nusb@v0.1.10...v0.2.1)

---
updated-dependencies:
- dependency-name: nusb
  dependency-version: 0.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/cargo/nusb-0.2.1 branch from df853d0 to eba4e3a Compare October 24, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant