File: README.md

package info (click to toggle)
rust-usb-ids 1.2025.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 204 kB
  • sloc: makefile: 4
file content (26 lines) | stat: -rw-r--r-- 785 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
usb-ids
=======

[![CI](https://github.com/woodruffw/usb-ids.rs/actions/workflows/ci.yml/badge.svg)](https://github.com/woodruffw/usb-ids.rs/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/usb-ids)](https://crates.io/crates/usb-ids)

Cross-platform Rust wrappers for the [USB ID Repository](http://www.linux-usb.org/usb-ids.html).

This library bundles the USB ID database, allowing platforms other than Linux to query it
as a source of canonical USB metadata.

## Usage

Iterating over all known vendors:

```rust
use usb_ids::Vendors;

for vendor in Vendors::iter() {
    for device in vendor.devices() {
        println!("vendor: {}, device: {}", vendor.name(), device.name());
    }
}
```

See [the documentation](https://docs.rs/usb-ids) for more details.