{"id":13726802,"url":"https://github.com/cloudhead/popol","last_synced_at":"2025-05-15T23:02:33.165Z","repository":{"id":50932698,"uuid":"277055053","full_name":"cloudhead/popol","owner":"cloudhead","description":"Minimal non-blocking I/O for Rust","archived":false,"fork":false,"pushed_at":"2024-12-27T20:19:17.000Z","size":70,"stargazers_count":165,"open_issues_count":7,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-08T09:12:35.800Z","etag":null,"topics":["async","networking","p2p","poll"],"latest_commit_sha":null,"homepage":"https://cloudhead.io/popol","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/cloudhead.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING","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":"2020-07-04T06:44:41.000Z","updated_at":"2025-03-23T17:41:05.000Z","dependencies_parsed_at":"2024-01-07T21:04:45.890Z","dependency_job_id":"fd5bed3e-69c6-4a19-a8e3-3dc06e75e75a","html_url":"https://github.com/cloudhead/popol","commit_stats":{"total_commits":76,"total_committers":4,"mean_commits":19.0,"dds":0.06578947368421051,"last_synced_commit":"b5768f601443d9de403ffb93e7f646c2c4a4fcd9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fpopol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fpopol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fpopol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudhead%2Fpopol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudhead","download_url":"https://codeload.github.com/cloudhead/popol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436932,"owners_count":22070944,"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":["async","networking","p2p","poll"],"created_at":"2024-08-03T01:03:23.416Z","updated_at":"2025-05-15T23:02:33.118Z","avatar_url":"https://github.com/cloudhead.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# popol\n\n*Minimal non-blocking I/O for Rust.*\n\nSee `examples/` folder for usage.\n\n## Overview\n\nAsync I/O in Rust is still an unsolved problem. With the stabilization of\n*async/await*, we are seeing a number of libraries and runtimes crop up, such\nas *async-std* and *smol*, while others such as *tokio* and *mio* are maturing.\nThe problem with *async/await* is that you can't use any of the standard\nlibrary traits, such as `Read` and `Write`.  The async ecosystem comes with an\nentirely separate suite of traits (eg. `AsyncRead` and `AsyncWrite`) and I/O\nlibraries. Furthermore, most of these runtimes have a large dependency\nfootprint, partly from having to provide async alternatives to the standard\nlibrary functions, and partly due to the complexity of these runtimes.\n\nWhat do we need? For most use-cases, the ability to handle between a dozen\nand up to a few hundred open connections without blocking, is all we need.\nThis places us squarely within the territory of the venerable `poll()` function,\nwhich is available on almost all platforms.\n\nPopol is designed as a minimal ergonomic wrapper around `poll()`, built for\npeer-to-peer networking.\n\nBy building on `poll`, we have the following advantages:\n\n* Much smaller implementation than even the smallest *async/await* runtimes\n* All of the Rust standard library just works (`io::Read`, `io::Write`, etc.)\n* Virtually zero-dependency (the *libc* crate is the only dependency)\n* No \"runtime\". Keeps the code much easier to reason about\n\nWhy not use `epoll`? A couple of reasons:\n\n1. It is more complex than `poll` and requires us to write more code\n2. It isn't portable (only works on Linux)\n3. `poll` is sufficient for handling most workloads\n\nCompared to *mio*, *popol* is:\n\n* A lot smaller (about 10% of the size)\n* A little more flexible and easy to use\n* Supports standard library sockets\n* Currently focused on unix-based system compatibility\n\nSome of the advantages of *popol*'s API over *mio*'s:\n\n* *popol* supports multiple *wakers* per wait call.\n* *popol* event source identifiers are not limited to `u64`.\n* *popol*'s API is composed mostly of infallible functions.\n\nOn the other hand, *mio* is more mature and probably better at handling very\nlarge number of connections. *Mio* also currently supports more platforms.\n\n## License\n\nThis software is licensed under the MIT license. See the `LICENSE` file for\ndetails.\n\n## About\n\n(c) Alexis Sellier \u003chttps://cloudhead.io\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudhead%2Fpopol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudhead%2Fpopol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudhead%2Fpopol/lists"}