{"id":15400658,"url":"https://github.com/armanbilge/epollcat","last_synced_at":"2026-01-14T03:42:58.980Z","repository":{"id":41150186,"uuid":"508487432","full_name":"armanbilge/epollcat","owner":"armanbilge","description":"minimum viable runtime","archived":true,"fork":false,"pushed_at":"2025-03-25T21:44:56.000Z","size":376,"stargazers_count":66,"open_issues_count":8,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-19T10:17:06.266Z","etag":null,"topics":["cats-effect","fs2","io","networking","scala-native"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/armanbilge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-06-28T23:48:59.000Z","updated_at":"2025-03-25T21:45:23.000Z","dependencies_parsed_at":"2024-12-17T09:07:15.379Z","dependency_job_id":"cb20489e-cd4c-4d60-a49d-6192d1427ba7","html_url":"https://github.com/armanbilge/epollcat","commit_stats":{"total_commits":342,"total_committers":4,"mean_commits":85.5,"dds":0.4005847953216374,"last_synced_commit":"8f091ed7c4e426df61169bbc0f680a40dcf949da"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/armanbilge/epollcat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanbilge%2Fepollcat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanbilge%2Fepollcat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanbilge%2Fepollcat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanbilge%2Fepollcat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armanbilge","download_url":"https://codeload.github.com/armanbilge/epollcat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanbilge%2Fepollcat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cats-effect","fs2","io","networking","scala-native"],"created_at":"2024-10-01T15:54:30.968Z","updated_at":"2026-01-14T03:42:58.961Z","avatar_url":"https://github.com/armanbilge.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]\n\u003e epollcat is deprecated. Cats Effect v3.6.0 and FS2 v3.12.0 now support network I/O on Scala Native out-of-the-box.\n\n# epollcat\n\nAn [I/O-integrated runtime](https://github.com/typelevel/cats-effect/discussions/3070) for [Cats Effect](https://typelevel.org/cats-effect/) on [Scala Native](https://scala-native.org/), implemented with the [`epoll` API](https://man7.org/linux/man-pages/man7/epoll.7.html) on Linux and the [`kqueue` API](https://en.wikipedia.org/wiki/Kqueue) on macOS.\n\nThe primary goal of this project is to provide implementations for Java network I/O APIs used in the [fs2-io](https://fs2.io/#/io) library so that its `fs2.io.net` package can cross-build for Scala Native. This in turn enables projects such as [http4s Ember](https://http4s.org/v0.23/docs/integrations.html#ember) and [Skunk](https://typelevel.org/skunk/) to cross-build for Native as well.\n\n```scala\nlibraryDependencies += \"com.armanbilge\" %%% \"epollcat\" % \"0.1.7\"\n```\n\n## FAQ\n\n### When do I need this?\n\nIf you are developing a Scala Native application for Linux and macOS that does network I/O with fs2-io or any library built on top of it, such as http4s Ember or Skunk. If you are not doing network I/O, then the default Cats Effect runtime will work fine.\n\n### How can I use this?\n\nThere are a couple options:\n\n1. Where you would normally use `IOApp` or `IOApp.Simple`, simply use `EpollApp` or `EpollApp.Simple` instead: it's a drop-in replacement.\n\n2. For test frameworks and other unusual situations, you may need to use `EpollRuntime.global`. For example to use with [munit-cats-effect](https://github.com/typelevel/munit-cats-effect):\n```scala\noverride def munitIORuntime = EpollRuntime.global\n```\n\n### Should I add this as a dependency to my Scala Native library?\n\nI do not recommend it. This project is intended for only applications, it is too opinionated for libraries to force it onto their users:\n1. It supports only Linux and macOS.\n2. It partially implements `java.*` APIs which it does not hold the \"namespace rights\" to, but these implementations are not canonical nor do they intend to be.\n3. Your user may want to use a different runtime in their application (for example the `CurlRuntime` from [http4s-curl](https://github.com/http4s/http4s-curl/)). It is not possible to mix runtimes; expect bad things to happen.\n\nHowever, you may want to add this dependency in your project's _Test_ scope so that you can run your test suite on Native. You may also recommend Native users of your library add this dependency to their applications.\n\n### Do I have have to use Cats Effect and FS2?\n\nActually, no :) inside `EpollRuntime.global` you will find a vanilla `ExecutionContext` and `Scheduler` with APIs in terms of Java `Runnable`. You can use these to run your Scala `Future`s or other effect types and interact directly with the Java APIs.\n\n### macOS support?\n\nDespite the project name, epollcat supports macOS as well via the [`kqueue` API](https://en.wikipedia.org/wiki/Kqueue).\n\n### Windows support?\n\nSorry, nope :)\n\n### Why not use libuv?\n\nFirst of all, I think a [libuv](https://libuv.org/)-based runtime is a great idea, particularly due to the cross-platform compatibility and also because it provides async DNS and file system APIs (via its own blocking pool). If anyone wants to work on this I would be very happy to help you get started!\n\nI thought a lot about this and where I should best put my time and energy. Here is some of my reasoning.\n\n1. Actually, libuv is a bit too high-level for our needs: it essentially offers an entire runtime, including a scheduler and a blocking pool. Ideally we would use only its cross-platform I/O polling capability within our own Cats Effect runtime, but this does not seem to be exposed unfortunately.\n\n    This becomes especially relevant when Scala Native supports multi-threading. Cats Effect JVM ships with a [fantastic runtime](https://github.com/typelevel/cats-effect#performance) that I am hopeful we can eventually cross-build for Native. Meanwhile, the libuv event loop is fundamentally single-threaded.\n\n    Since in the long run implementing our own async I/O library seems inevitable, this project makes an early investment in that direction.\n\n2. Dependencies on native libraries create build complexity, and build complexity is a [burden on maintainers](https://github.com/typelevel/scalacheck-xml/pull/1#issuecomment-1158140151) as well as contributors.\n\n3. epollcat is a pretty cool name and I couldn't think of anything comparable for libuv :) besides unicorn velociraptors probably eat cats for lunch! \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanbilge%2Fepollcat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmanbilge%2Fepollcat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanbilge%2Fepollcat/lists"}