{"id":19852705,"url":"https://github.com/shadowblip/virtual-usb-rs","last_synced_at":"2025-09-18T13:32:13.992Z","repository":{"id":237875099,"uuid":"776950898","full_name":"ShadowBlip/virtual-usb-rs","owner":"ShadowBlip","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-13T00:43:26.000Z","size":125,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-01T19:14:54.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShadowBlip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-24T22:01:41.000Z","updated_at":"2025-03-13T00:43:26.000Z","dependencies_parsed_at":"2024-05-03T13:10:33.667Z","dependency_job_id":"c48a0816-7194-4ea7-a610-72338191f16c","html_url":"https://github.com/ShadowBlip/virtual-usb-rs","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"5a7a96a6aedc54f339d9ebff78bf484e5b17728d"},"previous_names":["shadowblip/virtual-usb-rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShadowBlip/virtual-usb-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fvirtual-usb-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fvirtual-usb-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fvirtual-usb-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fvirtual-usb-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShadowBlip","download_url":"https://codeload.github.com/ShadowBlip/virtual-usb-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadowBlip%2Fvirtual-usb-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275774213,"owners_count":25526180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:04:04.971Z","updated_at":"2025-09-18T13:32:13.692Z","avatar_url":"https://github.com/ShadowBlip.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# virtual-usb-rs\n\nRust crate for emulating a USB device using the [vhci_hcd](\"https://github.com/torvalds/linux/blob/master/drivers/usb/usbip/vhci_hcd.c\")\nkernel module on Linux, allowing the creation of virtual USB devices that\nare visible to the system just like a real USB device is.\n\n## Usage\n\n### Creation\n\nTo create a virtual USB device, instantiate a VirtualUSBDevice (supplying\nstandard USB descriptors to the constructor), and call `start()`.\n\nTo aid in creation of a new VirtualUSBDevice, the VirtualUSBDeviceBuilder can\nbe used to correctly build a working USB device with the appropriate USB\ndescriptors.\n\n### Handling Transfers\n\nTo handle USB transfers, call `read()`. Before `read()` returns, VirtualUSBDevice\nwill automatically handle standard USB requests (such as `GET_STATUS`,\n`GET_DESCRIPTOR`, `SET_CONFIGURATION` requests, and all IN transfers), and will\nonly return from `read()` when there's an OUT transfer that it can't handle\nitself. The returned `Xfer` object represents the USB OUT transfer to be\nperformed, and contains these fields:\n\n- `ep`: the transfer's endpoint\n- `setupReq`: the Setup packet\n- `data`: the payload data\n\n### Sending Data\n\nTo write data to an IN endpoint, call `write()` with the endpoint and data.\n\n### Stopping\n\nTo tear down the virtual USB device, call `stop()`.\n\n### Example\n\nExample implementations can be found in the [examples](examples) folder.\n\n## References\n\nThis crate is heavily based off the great work of [davetoaster](https://github.com/davetoaster)\nand the [VirtualUSBDevice](\"https://github.com/toasterllc/VirtualUSBDevice\")\nproject licensed under public domain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowblip%2Fvirtual-usb-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowblip%2Fvirtual-usb-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowblip%2Fvirtual-usb-rs/lists"}