{"id":13420948,"url":"https://github.com/troglobit/libuev","last_synced_at":"2025-04-07T08:26:16.409Z","repository":{"id":9594691,"uuid":"11514356","full_name":"troglobit/libuev","owner":"troglobit","description":"Lightweight event loop library for Linux epoll() family APIs","archived":false,"fork":false,"pushed_at":"2024-03-16T20:52:46.000Z","size":636,"stargazers_count":241,"open_issues_count":0,"forks_count":37,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-31T06:08:18.753Z","etag":null,"topics":["c","epoll","event","event-driven","event-loops","event-watchers","eventfd","libevent","linux","monotonic","signalfd","timerfd"],"latest_commit_sha":null,"homepage":"https://codedocs.xyz/troglobit/libuev/","language":"C","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/troglobit.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["troglobit"]}},"created_at":"2013-07-18T21:38:34.000Z","updated_at":"2025-01-23T02:17:02.000Z","dependencies_parsed_at":"2024-06-19T05:22:42.098Z","dependency_job_id":"d6e3d261-06c5-4fbc-9e66-859645821702","html_url":"https://github.com/troglobit/libuev","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibuev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibuev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibuev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troglobit%2Flibuev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troglobit","download_url":"https://codeload.github.com/troglobit/libuev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247617198,"owners_count":20967549,"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":["c","epoll","event","event-driven","event-loops","event-watchers","eventfd","libevent","linux","monotonic","signalfd","timerfd"],"created_at":"2024-07-30T22:01:44.755Z","updated_at":"2025-04-07T08:26:16.384Z","avatar_url":"https://github.com/troglobit.png","language":"C","funding_links":["https://github.com/sponsors/troglobit"],"categories":["TODO scan for Android support in followings","C"],"sub_categories":[],"readme":"µEv | Simple event loop for Linux\n==================================\n[![License Badge][]][License] [![GitHub Status][]][GitHub] [![Coverity Status][]][Coverity Scan]\n\n\n* [Introduction](#introduction)\n* [API](doc/API.md#overview)\n  * [Create an Event Context](doc/API.md#create-an-event-context)\n  * [Register an Event Watcher](doc/API.md#register-an-event-watcher)\n  * [Start Event Loop](doc/API.md#start-event-loop)\n  * [Summary](doc/API.md#summary)\n* [Using -luev](doc/API.md#using--luev)\n* [Joystick Example](doc/API.md#joystick-example)\n* [Build \u0026 Install](#build--install)\n* [Origin \u0026 References](#origin--references)\n\n\n\u003e **NOTE:** Incompatible failure mode changes in v2.0 compared to v1.x!\n\nIntroduction\n------------\n\n[libuEv][] is a small event loop that wraps the Linux `epoll()` family\nof APIs.  It is similar to the more established [libevent][], [libev][]\nand the venerable [Xt(3)][] event loop.  The *µ* in the name refers to\nboth its limited feature set and the size impact of the library.\n\nLinux APIs supported and wrapped for ease-of-use:\n\n  - `epoll(2)`\n  - `eventfd(2)`\n  - `signalfd(2)`\n  - `timerfd(2)`\n\nFailure mode changes introduced in v2.0 may affect users of v1.x, See\nthe [ChangeLog][] for the full details.\n\nThe [API documentation](doc/API.md) is available as a separate document.\n\n\nExample\n-------\n\nNotice how watcher conditions like `UEV_ERROR` must be handled by each\ncallback.  I/O watchers must also check for `UEV_HUP`.  Both errors are\nusually fatal, libuEv makes sure to stop each watcher before a callback\nruns, leaving it up to the callback to take appropriate action.\n\n```C\n/* Set up a timer watcher to call cb() every other second */\n#include \u003cstdio.h\u003e\n#include \u003cuev/uev.h\u003e\n\nstatic void cb(uev_t *w, void *arg, int events)\n{\n        if (UEV_ERROR == events) {\n            puts(\"Problem with timer, attempting to restart.\");\n            uev_timer_start(w);\n            return;\n        }\n\n        puts(\"Every other second\");\n}\n\nint main(void)\n{\n        uev_ctx_t ctx;\n        uev_t timer;\n\n        uev_init(\u0026ctx);\n        uev_timer_init(\u0026ctx, \u0026timer, cb, NULL, 2 * 1000, 2 * 1000);\n\n        return uev_run(\u0026ctx, 0);\n}\n```\n\n\nBuild \u0026 Install\n---------------\n\nlibuEv use the GNU configure and build system.  To try out the bundled\nexamples, use the `--enable-examples` switch to the `configure` script.\nThere is also a limited unit test suite that can be useful to learn how\nthe library works.\n\n```sh\n./configure\nmake -j5\nmake check\nsudo make install-strip\nsudo ldconfig\n```\n\nThe resulting .so library is ~23 kiB.\n\nTo build from GIT sources; clone the repository and run the `autogen.sh`\nscript.  This requires GNU `automake`, `autoconf` amd `libtool` to be\ninstalled on your system.  (If you build from a released tarball you do\nnot need them.)\n\n\nOrigin \u0026 References\n-------------------\n\n[libuEv][] is developed and maintained by [Joachim Wiberg][] on GitHub.\nIt is primarily built for and developed on GNU/Linux systems, patches to\nsupport the BSD [kqueue][] interface are most welcome.\n\nOriginally based on [LibUEvent][] by [Flemming Madsen][], uEv has since\nevolved to support all of the Linux `epoll()` family APIs.  It is now\nmore similar to the excellent [libev][] by [Mark Lehmann][], with some\ninspiration also from [picoev][] by [Oku Kazuho][].\n\n\n[ChangeLog]:       https://github.com/troglobit/libuev/blob/master/ChangeLog.md\n[License]:         https://en.wikipedia.org/wiki/MIT_License\n[License Badge]:   https://img.shields.io/badge/License-MIT-teal.svg\n[GitHub]:          https://github.com/troglobit/libuev/actions/workflows/build.yml/\n[GitHub Status]:   https://github.com/troglobit/libuev/actions/workflows/build.yml/badge.svg\n[Coverity Scan]:   https://scan.coverity.com/projects/3846\n[Coverity Status]: https://scan.coverity.com/projects/3846/badge.svg\n[libevent]:        https://libevent.org\n[Xt(3)]:           https://unix.com/man-page/All/3x/XtDispatchEvent\n[LibUEvent]:       https://code.google.com/p/libuevent/\n[picoev]:          https://github.com/kazuho/picoev\n[libev]:           http://software.schmorp.de/pkg/libev.html\n[LibuEv]:          https://github.com/troglobit/libuev\n[kqueue]:          https://github.com/mheily/libkqueue\n[Oku Kazuho]:      https://github.com/kazuho\n[Mark Lehmann]:    http://software.schmorp.de\n[Joachim Wiberg]: http://troglobit.com\n[Flemming Madsen]: http://www.madsensoft.dk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroglobit%2Flibuev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroglobit%2Flibuev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroglobit%2Flibuev/lists"}