{"id":19061996,"url":"https://github.com/Smithay/udev-rs","last_synced_at":"2025-04-18T01:31:57.767Z","repository":{"id":27227731,"uuid":"112956987","full_name":"Smithay/udev-rs","owner":"Smithay","description":"Libudev bindings for Rust","archived":false,"fork":false,"pushed_at":"2025-01-23T10:41:39.000Z","size":137,"stargazers_count":49,"open_issues_count":2,"forks_count":29,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-13T20:52:13.139Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smithay.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-03T19:31:06.000Z","updated_at":"2025-04-11T00:03:00.000Z","dependencies_parsed_at":"2023-09-23T05:42:13.961Z","dependency_job_id":"c9dd854d-3f71-41d0-837d-c9ec4a4f791d","html_url":"https://github.com/Smithay/udev-rs","commit_stats":{"total_commits":107,"total_committers":29,"mean_commits":3.689655172413793,"dds":0.6728971962616823,"last_synced_commit":"8aa259d6408ede99972f476e3331259c3132c8ff"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithay%2Fudev-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithay%2Fudev-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithay%2Fudev-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithay%2Fudev-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smithay","download_url":"https://codeload.github.com/Smithay/udev-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782283,"owners_count":21160716,"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":[],"created_at":"2024-11-09T00:23:59.704Z","updated_at":"2025-04-18T01:31:57.755Z","avatar_url":"https://github.com/Smithay.png","language":"Rust","funding_links":[],"categories":["systemd-udev"],"sub_categories":[],"readme":"# udev\nThis crate provides a safe wrapper around the native `libudev` library. It applies the RAII pattern\nand Rust lifetimes to ensure safe usage of all `libudev` functionality. The RAII pattern ensures\nthat all acquired resources are released when they're no longer needed, and Rust lifetimes ensure\nthat resources are released in a proper order.\n\n* [Documentation](http://docs.rs/udev/)\n\n## Dependencies\nIn order to use the `libudev` crate, you must have a Linux system with the `libudev` library\ninstalled where it can be found by `pkg-config`. To install `libudev` on Debian-based Linux\ndistributions, execute the following command:\n\n```\nsudo apt-get install libudev-dev\n```\n\n`libudev` is a Linux-specific package. It is not available for Windows, OS X, or other operating\nsystems.\n\n### Cross-Compiling\nThe `libudev` crate can be used when cross-compiling to a foreign target. Details on how to\ncross-compile `libudev` are explained in the [`libudev-sys` crate's\nREADME](https://github.com/dcuddeback/libudev-sys#cross-compiling).\n\n## Usage\nAdd `udev` as a dependency in `Cargo.toml`:\n\n```toml\n[dependencies]\nudev = \"^0.9.3\"\n```\n\nIf you plan to support operating systems other than Linux, you'll need to add `udev` as a\ntarget-specific dependency:\n\n```toml\n[target.x86_64-unknown-linux-gnu.dependencies]\nudev = \"^0.9.3\"\n```\n\nImport the `udev` crate.\n\n```rust\nextern crate udev;\n\nfn main() {\n  let mut enumerator = udev::Enumerator::new().unwrap();\n\n  enumerator.match_subsystem(\"tty\").unwrap();\n\n  for device in enumerator.scan_devices().unwrap() {\n    println!(\"found device: {:?}\", device.syspath());\n  }\n}\n```\n\n### Thread-safety\n\nThe udev-api does not have any thread-safety guarantees, however many implementations are indeed thread-safe.\nIf you are certain the implementations you are targetting and supporting are, you can enable the `send`-feature\nto have `udev-rs` types implement `Send`:\n\n```toml\n[dependencies]\nudev = { version = \"^0.9.3\", features = [\"send\"] }\n```\n\nThe even stronger `Sync` bound can be added with the `sync` feature.\n\n\n## Contributors\n* [drakulix](https://github.com/drakulix)\n* [dcuddeback](https://github.com/dcuddeback)\n* [mulkieran](https://github.com/mulkieran)\n* [Susurrus](https://github.com/Susurrus)\n* [woodruffw](https://github.com/woodruffw)\n* [Ravenslofty](https://github.com/Ravenslofty)\n* [sjoerdsimons](https://github.com/sjoerdsimons)\n* [anelson](https://github.com/anelson)\n* [ollpu](https://github.com/ollpu)\n* [a1ien](https://github.com/a1ien)\n* [lj94093](https://github.com/lj94093)\n* [patrickelectric](https://github.com/patrickelectric)\n* [TomzBench](https://github.com/TomzBench)\n* [endrift](https://github.com/endrift)\n\n## License\nCopyright © 2017 Victoria Brekenfeld\nCopyright © 2015 David Cuddeback\n\nCopyright for portions of the project are held by [David Cuddeback, 2015] as part of the project.\nAll other copyright for the project are held by [Victoria Brekenfeld, 2017].\n\nDistributed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSmithay%2Fudev-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSmithay%2Fudev-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSmithay%2Fudev-rs/lists"}