{"id":16116923,"url":"https://github.com/ralith/sd-listen-fds","last_synced_at":"2025-09-27T15:31:24.917Z","repository":{"id":185124018,"uuid":"671370514","full_name":"Ralith/sd-listen-fds","owner":"Ralith","description":"Minimal self-contained crate to accept file descriptors from systemd","archived":false,"fork":false,"pushed_at":"2023-08-27T21:25:33.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-12T06:40:33.878Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ralith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2023-07-27T07:00:53.000Z","updated_at":"2024-06-28T08:32:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b2948de-a552-4e1f-894d-fc7188ac07da","html_url":"https://github.com/Ralith/sd-listen-fds","commit_stats":null,"previous_names":["ralith/sd-listen-fds"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ralith%2Fsd-listen-fds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ralith%2Fsd-listen-fds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ralith%2Fsd-listen-fds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ralith%2Fsd-listen-fds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ralith","download_url":"https://codeload.github.com/Ralith/sd-listen-fds/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234444607,"owners_count":18833658,"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-10-09T20:27:10.913Z","updated_at":"2025-09-27T15:31:19.636Z","avatar_url":"https://github.com/Ralith.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sd-listen-fds\n\n[![Documentation](https://docs.rs/oddio/badge.svg)](https://docs.rs/sd-listen-fds/)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE-APACHE)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE-MIT)\n\nExposes file descriptors passed in by systemd, the Linux init daemon,\nwithout dependencies, foreign or otherwise. Enables easy\nimplementation of socket-activated services in pure Rust.\n\nUnlike services that open sockets themselves, socket-activated\nservices are started on-demand, may start up concurrently with their\ndependencies, and may be restarted without losing inbound\ndata. Portable applications can call `sd_listen_fds::get()` and open\ntheir own socket if it succeeds with an empty `Vec`.\n\nSee also the\n[sd_listen_fds](https://www.freedesktop.org/software/systemd/man/sd_listen_fds.html)\nAPI exposed by the foreign `libsystemd` library. Compared to using\n`libsystemd` bindings, this crate is smaller, safer, and builds\neverywhere.\n\n### Example\n\n```rust\nlet fds = sd_listen_fds::get().unwrap();\nlet (_name, fd) = fds\n    .into_iter()\n    .next()\n    .expect(\"must be launched as a systemd socket-activated service\");\nlet socket = TcpListener::from(fd);\n```\n\nmy-service.socket (see also [systemd.socket](https://www.freedesktop.org/software/systemd/man/systemd.socket.html))\n```ini\n[Socket]\n# TCP port number. Other types of sockets are also possible.\nListenStream=1234\n\n[Install]\nWantedBy=sockets.target\n\n[Unit]\nDescription=My Rust service\nDocumentation=https://example.com/my-service/\n```\n\nmy-service.service (see also [systemd.service](https://www.freedesktop.org/software/systemd/man/systemd.service.html))\n```ini\n[Service]\nExecStart=/path/to/my-service\n\n[Unit]\nRequires=my-service.socket\nDescription=My Rust service\nDocumentation=https://example.com/my-service/\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the\nApache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralith%2Fsd-listen-fds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fralith%2Fsd-listen-fds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fralith%2Fsd-listen-fds/lists"}