{"id":13703676,"url":"https://github.com/swow/swow","last_synced_at":"2026-03-07T23:09:11.552Z","repository":{"id":37436907,"uuid":"295651066","full_name":"swow/swow","owner":"swow","description":"Coroutine-based cross-platform concurrent I/O engine.","archived":false,"fork":false,"pushed_at":"2025-04-02T06:59:37.000Z","size":6103,"stargazers_count":1254,"open_issues_count":39,"forks_count":118,"subscribers_count":51,"default_branch":"develop","last_synced_at":"2025-05-06T14:27:46.933Z","etag":null,"topics":["async","asynchronous","coroutine","coroutines","php"],"latest_commit_sha":null,"homepage":"","language":"C","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/swow.png","metadata":{"files":{"readme":"README-CN.md","changelog":"CHANGELOG.md","contributing":null,"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,"zenodo":null}},"created_at":"2020-09-15T07:37:43.000Z","updated_at":"2025-05-04T21:43:17.000Z","dependencies_parsed_at":"2023-11-22T06:31:58.428Z","dependency_job_id":"90139f2f-44af-4917-a5a2-923265202f12","html_url":"https://github.com/swow/swow","commit_stats":{"total_commits":2035,"total_committers":23,"mean_commits":88.47826086956522,"dds":0.2511056511056511,"last_synced_commit":"fd9c823aa73c104f5f09fdd3c5dc33190337b6e2"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swow%2Fswow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swow%2Fswow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swow%2Fswow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swow%2Fswow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swow","download_url":"https://codeload.github.com/swow/swow/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253429349,"owners_count":21907110,"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","asynchronous","coroutine","coroutines","php"],"created_at":"2024-08-02T21:00:58.797Z","updated_at":"2026-03-07T23:09:06.525Z","avatar_url":"https://github.com/swow.png","language":"C","funding_links":[],"categories":["目录","C"],"sub_categories":["网络通信引擎 Network-Communication-Engine"],"readme":"[English](./README.md) | 中文 | [日本語](./README-JP.md)\n\n\u003ch2 align=\"center\"\u003e\n\u003ca href=\"https://github.com/swow/swow\"\u003e\u003cimg width=\"320\" height=\"86\" alt=\"Swow Logo\" src=\"https://docs.toast.run/assets/images/swow.svg\" /\u003e\u003c/a\u003e\u003cbr /\u003e\n🚀 Swow 是一个专注于并发 I/O 的跨平台协程引擎\n\u003c/h2\u003e\n\n[![license][license-badge]][license-link]\n[![ci][ci-badge]][ci-link]\n[![codecov][codecov-badge]][codecov-link]\n[![release][release-badge]][release-link]\n![❤️][made-with-love-badge]\n![php][supported-php-versions-badge]\n![platform][supported-platforms-badge]\n![architecture][supported-architectures-badge]\n\n## 👾 设计理念\n\nSwow 致力于使用最小 C 核心及多数 PHP 代码以支持 PHP 高性能网络编程，这决定了它在保障关键性能之外，更多的是通过 PHP 代码与 C 内核的无缝融合运作，提供强大的二次开发能力。\n\n此外，它还提供了丰富多样的调试机制与强大且低门槛的调试工具，最大程度地确保开发者免受 BUG 困扰，普通开发者也能通过工具的加持具备接近专家级别的 DEBUG 能力，从而将开发效率最大化。\n\n## 🎮 安装\n\n\u003e 和任何开源项目一样, Swow 总是在**最新的发行版**提供更佳的稳定性和更强大的功能, 请尽量保证你使用的是最新版本。\n\n### 🔎 必要条件\n\n- Linux、 Windows、macOS 等常见操作系统，详见 [发布文档 - 支持的操作系统](https://docs.toast.run/swow-blog/chs/init.html#%E6%94%AF%E6%8C%81%E7%9A%84%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F)\n- PHP 8.0.0 或以上版本，推荐使用最新版本\n\n### 👨‍🎤 通过 Composer 安装 (扩展 + PHP 库)\n\n拉取源码：\n\n```shell\ncomposer require swow/swow\n```\n\n然后运行 `vendor/bin` 目录下的自动安装器 `swow-builder` 即可开始安装：\n\n```shell\n./vendor/bin/swow-builder --install\n```\n\n当你更新了 Swow 的源码时，你最好使用 `rebuild` 选项来重新编译 Swow 再安装：\n\n```shell\n./vendor/bin/swow-builder --rebuild --install\n```\n\n更多关于 `swow-builder` 的使用方法，请参考 [安装文档 - 通过 Composer 安装](https://docs.toast.run/swow/chs/install.html#%E9%80%9A%E8%BF%87-composer-%E5%AE%89%E8%A3%85)。\n\n### 🐧 手动编译安装 (UNIX-like)\n\n克隆项目（也可以通过 Composer 引入，cd 到 `vendor/swow/swow/ext` 中手动编译）：\n\n```shell\ngit clone https://github.com/swow/swow.git\n````\n\n熟悉的构建三板斧，最后使用root权限安装到系统：\n\n```shell\ncd swow/ext \u0026\u0026 \\\nphpize \u0026\u0026 ./configure \u0026\u0026 \\\nmake clean \u0026\u0026 make -j \u0026\u0026 \\\nsudo make install\n```\n\n详见 [安装文档 - 手动编译安装 (UNIX-like)](https://docs.toast.run/swow/chs/install.html#%E6%89%8B%E5%8A%A8%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85-unix-like-%E6%88%96-cygwinmsyswsl)。\n\n### Ⓜ️ 手动编译安装 (Windows)\n\n详见 [安装文档 - 手动编译安装 (Windows)](https://docs.toast.run/swow/chs/install.html#%E6%89%8B%E5%8A%A8%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85-windows)。\n\n也可在 [最新的发行版](https://github.com/swow/swow/releases/latest) 中直接下载 DLL。\n\n## 🔰️ 安全问题\n\n安全问题应该通过邮件私下报告给 [twosee@php.net](mailto:twosee@php.net)。\n你将在 24 小时内收到回复，如果因为某些原因你没有收到回复，请通过回复原始邮件的方式跟进，以确保我们收到了你的原始邮件。\n\n## 🖊️ 贡献\n\n你的贡献对于 Swow 的发展至关重要！\n\n你可以通过以下方式来贡献：\n\n* [报告问题与反馈](https://github.com/swow/swow/issues)\n* [通过 Pull Request 提交修复补丁或新的特性实现](https://github.com/swow/swow/pulls)\n* [帮助我们完善文档 (通过 GitHub 贡献)](https://github.com/toastrun/docs.toast.run)\n\n## ❤️ 贡献者\n\nPHP 高性能协程网络通信引擎开发之路曲高和寡，这是一项高处不胜寒的开源工作。\n\n非常感谢以下小伙伴对于 Swow 项目的代码贡献，没有大家就没有现在的 Swow。\n\n[![Contributors](https://opencollective.com/swow/contributors.svg?width=890\u0026button=false)](https://github.com/swow/swow/graphs/contributors)\n\n## 💬 开发 \u0026 讨论\n\n- **文档**：[https://docs.toast.run/swow/chs](https://docs.toast.run/swow/chs)\n- **博客** [https://docs.toast.run/swow-blog/chs](https://docs.toast.run/swow-blog/chs)\n- **能力项** [https://docs.toast.run/swow-blog/chs/init.html](https://docs.toast.run/swow-blog/chs/init.html)\n- **API参考**：[https://docs.toast.run/swow-api/ci.html](https://docs.toast.run/swow-api/ci.html)\n- **讨论区**：[https://github.com/swow/swow/discussions](https://github.com/swow/swow/discussions)\n- **计划列表**：[https://github.com/swow/swow/projects](https://github.com/swow/swow/projects)\n\n## 📃 开源协议\n\nSwow 使用 [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) 开源。\n\nSwow 也包含了一些第三方库，这些库的开源协议各不相同，请参考 [LICENSES.full](LICENSES.full) 获取完整的开源协议文本。\n\n[license-badge]: https://img.shields.io/badge/license-apache2-blue.svg\n[license-link]: LICENSE\n[ci-badge]: https://github.com/swow/swow/workflows/tests/badge.svg\n[ci-link]: https://github.com/swow/swow/actions?query=workflow:tests\n[codecov-badge]: https://codecov.io/gh/swow/swow/branch/develop/graph/badge.svg\n[codecov-link]: https://codecov.io/gh/swow/swow\n[release-badge]: https://img.shields.io/github/release/swow/swow.svg?style=flat-square\n[release-link]: https://github.com/swow/swow/releases\n[made-with-love-badge]: https://img.shields.io/badge/made%20with-%E2%9D%A4-f00\n[supported-php-versions-badge]: https://img.shields.io/badge/php-8.0--8.3-royalblue.svg\n[supported-platforms-badge]: https://img.shields.io/badge/platform-Win32%20|%20GNU/Linux%20|%20macOS%20|%20FreeBSD%20-gold\n[supported-architectures-badge]: https://img.shields.io/badge/architecture-x86--64%20|%20ARM64%20|%20mips64el%20|%20riscv64%20-maroon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswow%2Fswow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswow%2Fswow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswow%2Fswow/lists"}