{"id":13513476,"url":"https://github.com/socketry/nio4r","last_synced_at":"2025-05-12T13:13:11.132Z","repository":{"id":2090826,"uuid":"3030982","full_name":"socketry/nio4r","owner":"socketry","description":"Cross-platform asynchronous I/O primitives for scalable network clients and servers.","archived":false,"fork":false,"pushed_at":"2024-11-27T21:09:59.000Z","size":1082,"stargazers_count":976,"open_issues_count":9,"forks_count":85,"subscribers_count":29,"default_branch":"main","last_synced_at":"2025-05-01T02:56:41.796Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/socketry.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2011-12-22T00:48:15.000Z","updated_at":"2025-04-30T07:28:19.000Z","dependencies_parsed_at":"2023-02-10T18:46:07.490Z","dependency_job_id":"f43ea566-a233-4d70-8854-03fb396b7712","html_url":"https://github.com/socketry/nio4r","commit_stats":{"total_commits":662,"total_committers":57,"mean_commits":"11.614035087719298","dds":0.4259818731117825,"last_synced_commit":"315b1f62d038e2287f4dc852638fdf19a03cae87"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fnio4r","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fnio4r/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fnio4r/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketry%2Fnio4r/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socketry","download_url":"https://codeload.github.com/socketry/nio4r/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251840289,"owners_count":21652313,"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-08-01T05:00:27.556Z","updated_at":"2025-05-12T13:13:10.168Z","avatar_url":"https://github.com/socketry.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# ![nio4r](https://raw.github.com/socketry/nio4r/master/logo.png)\n\n[![Development Status](https://github.com/socketry/nio4r/workflows/Test/badge.svg)](https://github.com/socketry/nio4r/actions?workflow=Test)\n\n**New I/O for Ruby (nio4r)**: cross-platform asynchronous I/O primitives for\nscalable network clients and servers. Modeled after the Java NIO API, but\nsimplified for ease-of-use.\n\n**nio4r** provides an abstract, cross-platform stateful I/O selector API for Ruby.\nI/O selectors are the heart of \"reactor\"-based event loops, and monitor\nmultiple I/O objects for various types of readiness, e.g. ready for reading or\nwriting.\n\n## Projects using nio4r\n\n  - [ActionCable](https://rubygems.org/gems/actioncable): Rails 5 WebSocket protocol, uses nio4r for a WebSocket server\n  - [Celluloid](https://github.com/celluloid/celluloid-io): Actor-based concurrency framework, uses nio4r for async I/O\n  - [Async](https://github.com/socketry/async): Asynchronous I/O framework for Ruby\n  - [Puma](https://github.com/puma/puma): Ruby/Rack web server built for concurrency\n\n## Goals\n\n  - Expose high-level interfaces for stateful IO selectors\n  - Keep the API small to maximize both portability and performance across many\n    different OSes and Ruby VMs\n  - Provide inherently thread-safe facilities for working with IO objects\n\n## Supported platforms\n\n  - Ruby 2.5\n  - Ruby 2.6\n  - Ruby 2.7\n  - Ruby 3.0\n  - [JRuby](https://github.com/jruby/jruby)\n  - [TruffleRuby](https://github.com/oracle/truffleruby)\n\n## Supported backends\n\n  - **libev**: MRI C extension targeting multiple native IO selector APIs (e.g epoll, kqueue)\n  - **Java NIO**: JRuby extension which wraps the Java NIO subsystem\n  - **Pure Ruby**: `Kernel.select`-based backend that should work on any Ruby interpreter\n\n## Documentation\n\n[Please see the nio4r wiki](https://github.com/socketry/nio4r/wiki)\nfor more detailed documentation and usage notes:\n\n  - [Getting Started](https://github.com/socketry/nio4r/wiki/Getting-Started): Introduction to nio4r's components\n  - [Selectors](https://github.com/socketry/nio4r/wiki/Selectors): monitor multiple `IO` objects for readiness events\n  - [Monitors](https://github.com/socketry/nio4r/wiki/Monitors): control interests and inspect readiness for specific `IO` objects\n  - [Byte Buffers](https://github.com/socketry/nio4r/wiki/Byte-Buffers): fixed-size native buffers for high-performance I/O\n\nSee also:\n\n  - [YARD API documentation](http://www.rubydoc.info/gems/nio4r/frames)\n\n## Non-goals\n\n**nio4r** is not a full-featured event framework like [EventMachine](https://github.com/eventmachine/eventmachine) or [Cool.io](https://coolio.github.io/).\nInstead, nio4r is the sort of thing you might write a library like that on\ntop of. nio4r provides a minimal API such that individual Ruby implementers\nmay choose to produce optimized versions for their platform, without having\nto maintain a large codebase.\n\n## Releases\n\nBump the version first:\n\n    bundle exec bake gem:release:version:patch\n\n### CRuby\n\n    rake clean\n    rake release\n\n### JRuby\n\nYou might need to delete `Gemfile.lock` before trying to `bundle install`.\n\n    # Ensure you have the correct JDK:\n    pacman -Syu jdk-openjdk\n    archlinux-java set java-19-openjdk\n    \n    # Ensure you are using jruby:\n    chruby jruby\n    bundle update\n    \n    # Build the package:\n    rake clean\n    rake compile\n    rake release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketry%2Fnio4r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketry%2Fnio4r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketry%2Fnio4r/lists"}