{"id":19061987,"url":"https://github.com/rust-italia/mdev","last_synced_at":"2025-04-30T15:07:30.825Z","repository":{"id":41539710,"uuid":"403309790","full_name":"rust-italia/mdev","owner":"rust-italia","description":"mdev daemon workalike, written in pure rust","archived":false,"fork":false,"pushed_at":"2024-12-31T17:21:56.000Z","size":60,"stargazers_count":4,"open_issues_count":9,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T17:11:15.830Z","etag":null,"topics":["hacktoberfest","mdev"],"latest_commit_sha":null,"homepage":"","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/rust-italia.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,"zenodo":null}},"created_at":"2021-09-05T13:00:53.000Z","updated_at":"2025-03-03T14:04:16.000Z","dependencies_parsed_at":"2024-02-18T21:22:35.711Z","dependency_job_id":"36a328da-192e-4316-8e38-537b3a4f481d","html_url":"https://github.com/rust-italia/mdev","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-italia%2Fmdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-italia%2Fmdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-italia%2Fmdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-italia%2Fmdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-italia","download_url":"https://codeload.github.com/rust-italia/mdev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251727958,"owners_count":21634121,"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":["hacktoberfest","mdev"],"created_at":"2024-11-09T00:23:59.419Z","updated_at":"2025-04-30T15:07:30.763Z","avatar_url":"https://github.com/rust-italia.png","language":"Rust","funding_links":[],"categories":["systemd-udev"],"sub_categories":[],"readme":"# mdev\nmdev daemon workalike, written in pure rust\n\n[mdev](https://git.busybox.net/busybox/plain/docs/mdev.txt) and [mdevd](https://skarnet.org/software/mdevd/) are uevent managers, they listen for kernel object userspace [events](https://www.kernel.org/doc/html/latest/core-api/kobject.html#uevents) and react according to a set of rules that are coded in their `mdev.conf` format.\n\n## Structure and components\nAny uevent manager daemon has 4 primary components:\n- [x] A netlink listener, in our case [netlink-sys](https://crates.io/crates/netlink-sys) provides us already some level of abstraction\n- [x] Something that [parses](https://github.com/rust-italia/kobject-uevent) the messages encoded in the netlink packets\n- [x] A set of rules on how to react to the events, we use the same [mdev.conf format](https://github.com/rust-italia/mdev-parser)\n- [x] The actual code that reacts to the events according to the rules\n  - [x] It matches events with rules\n  - [] It executes the actual action and make sure to log the results of it\n\n```\n┌─────────┐                 ┌───────────┐\n│ Linux   │ Uevent Packets  │ Netlink   │    UEvents\n│  Kernel ├────────────────►│  Listener ├─────────────────┐\n│         │                 │           │                 ▼\n└─────────┘                 └───────────┘            ┌──────────┐\n                                                     │ UEvent   │\n                                                     │  Daemon  │\n┌───────────┐               ┌───────────┐            └───────┬──┘\n│ mdev.conf │ mdev lines    │ Rules     │                 ▲  │\n│           ├──────────────►│  Parser   ├─────────────────┘  │\n│           │               │           │   Rules            │\n└───────────┘               └───────────┘                    ▼\n                                                    ┌────────────┐\n                                                    │ Actions    │\n                                                    └────────────┘\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-italia%2Fmdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-italia%2Fmdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-italia%2Fmdev/lists"}