{"id":28452534,"url":"https://github.com/surban/usb-gadget","last_synced_at":"2025-07-02T04:31:06.009Z","repository":{"id":199548530,"uuid":"697508654","full_name":"surban/usb-gadget","owner":"surban","description":"Expose standard or fully custom USB peripherals (gadgets) through a USB device controller (UDC) on Linux using Rust.","archived":false,"fork":false,"pushed_at":"2024-12-06T10:08:18.000Z","size":129,"stargazers_count":115,"open_issues_count":3,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-06T18:11:50.375Z","etag":null,"topics":["linux","rust","udc","usb","usb-device","usb-functionfs","usb-gadget"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/usb-gadget","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/surban.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-27T21:57:39.000Z","updated_at":"2025-06-03T09:23:08.000Z","dependencies_parsed_at":"2023-12-10T21:29:38.076Z","dependency_job_id":"edfa68a2-ce8b-4ea4-9a79-d994043da47a","html_url":"https://github.com/surban/usb-gadget","commit_stats":null,"previous_names":["surban/usb-gadget"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/surban/usb-gadget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surban%2Fusb-gadget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surban%2Fusb-gadget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surban%2Fusb-gadget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surban%2Fusb-gadget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surban","download_url":"https://codeload.github.com/surban/usb-gadget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surban%2Fusb-gadget/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263074388,"owners_count":23409752,"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","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":["linux","rust","udc","usb","usb-device","usb-functionfs","usb-gadget"],"created_at":"2025-06-06T18:11:41.634Z","updated_at":"2025-07-02T04:31:05.994Z","avatar_url":"https://github.com/surban.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"usb-gadget\n==========\n\n[![crates.io page](https://img.shields.io/crates/v/usb-gadget)](https://crates.io/crates/usb-gadget)\n[![docs.rs page](https://docs.rs/usb-gadget/badge.svg)](https://docs.rs/usb-gadget)\n[![Apache 2.0 license](https://img.shields.io/crates/l/usb-gadget)](https://github.com/surban/usb-gadget/blob/master/LICENSE)\n\nThis library allows implementation of USB peripherals, so called **USB gadgets**,\non Linux devices that have a USB device controller (UDC).\nBoth, pre-defined USB functions and fully custom implementations of the USB\ninterface are supported.\n\nThe following pre-defined USB functions, implemented by kernel drivers, are available:\n\n* network interface\n    * CDC ECM\n    * CDC ECM (subset)\n    * CDC EEM\n    * CDC NCM\n    * RNDIS\n* serial port\n    * CDC ACM\n    * generic\n* human interface device (HID)\n* mass-storage device (MSD)\n* printer device\n* musical instrument digital interface (MIDI)\n* audio device (UAC2)\n* video device (UVC)\n\nIn addition fully custom USB functions can be implemented in user-mode Rust code.\n\nSupport for OS-specific descriptors and WebUSB is also provided.\n\nFeatures\n--------\n\nThis crate provides the following optional features:\n\n* `tokio`: enables async support for custom USB functions on top of the Tokio runtime.\n\nRequirements\n------------\n\nThe minimum support Rust version (MSRV) is 1.73.\n\nA USB device controller (UDC) supported by Linux is required. Normally, standard\nPCs *do not* include an UDC.\nA Raspberry Pi 4 contains an UDC, which is connected to its USB-C port.\n\nThe following Linux kernel configuration options should be enabled for full functionality:\n\n  * `CONFIG_USB_GADGET`\n  * `CONFIG_USB_CONFIGFS`\n  * `CONFIG_USB_CONFIGFS_SERIAL`\n  * `CONFIG_USB_CONFIGFS_ACM`\n  * `CONFIG_USB_CONFIGFS_NCM`\n  * `CONFIG_USB_CONFIGFS_ECM`\n  * `CONFIG_USB_CONFIGFS_ECM_SUBSET`\n  * `CONFIG_USB_CONFIGFS_RNDIS`\n  * `CONFIG_USB_CONFIGFS_EEM`\n  * `CONFIG_USB_CONFIGFS_MASS_STORAGE`\n  * `CONFIG_USB_CONFIGFS_F_FS`\n  * `CONFIG_USB_CONFIGFS_F_HID`\n  * `CONFIG_USB_CONFIGFS_F_PRINTER`\n  * `CONFIG_USB_CONFIGFS_F_MIDI`\n  * `CONFIG_USB_CONFIGFS_F_UAC2`\n  * `CONFIG_USB_CONFIGFS_F_UVC`\n\nroot permissions are required to configure USB gadgets on Linux and\nthe `configfs` filesystem needs to be mounted.\n\n\nLicense\n-------\n\nusb-gadget is licensed under the [Apache 2.0 license].\n\n[Apache 2.0 license]: https://github.com/surban/usb-gadget/blob/master/LICENSE\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in usb-gadget by you, shall be licensed as Apache 2.0, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurban%2Fusb-gadget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurban%2Fusb-gadget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurban%2Fusb-gadget/lists"}