{"id":13420269,"url":"https://github.com/libuv/libuv","last_synced_at":"2025-09-09T21:17:50.954Z","repository":{"id":12206775,"uuid":"14812739","full_name":"libuv/libuv","owner":"libuv","description":"Cross-platform asynchronous I/O","archived":false,"fork":false,"pushed_at":"2025-05-02T08:13:07.000Z","size":16770,"stargazers_count":25199,"open_issues_count":186,"forks_count":3689,"subscribers_count":723,"default_branch":"v1.x","last_synced_at":"2025-05-05T15:57:43.375Z","etag":null,"topics":["asynchronous","deep-io","io","networking","unicorns","unix","velociraptors","windows"],"latest_commit_sha":null,"homepage":"https://libuv.org/","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/libuv.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORTED_PLATFORMS.md","governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-11-30T00:29:56.000Z","updated_at":"2025-05-05T14:39:45.000Z","dependencies_parsed_at":"2023-10-27T23:29:29.015Z","dependency_job_id":"b1e52a25-4a04-4dfd-9341-114f40705af7","html_url":"https://github.com/libuv/libuv","commit_stats":{"total_commits":5240,"total_committers":572,"mean_commits":9.160839160839162,"dds":0.716030534351145,"last_synced_commit":"eb5af8e3c0ea19a6b0196d5db3212dae1785739b"},"previous_names":[],"tags_count":241,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libuv%2Flibuv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libuv%2Flibuv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libuv%2Flibuv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libuv%2Flibuv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libuv","download_url":"https://codeload.github.com/libuv/libuv/tar.gz/refs/heads/v1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253086300,"owners_count":21851765,"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":["asynchronous","deep-io","io","networking","unicorns","unix","velociraptors","windows"],"created_at":"2024-07-30T22:01:30.059Z","updated_at":"2025-05-12T18:33:39.082Z","avatar_url":"https://github.com/libuv.png","language":"C","readme":"![libuv][libuv_banner]\n\n## Overview\n\nlibuv is a multi-platform support library with a focus on asynchronous I/O. It\nwas primarily developed for use by [Node.js][], but it's also\nused by [Luvit](http://luvit.io/), [Julia](http://julialang.org/),\n[uvloop](https://github.com/MagicStack/uvloop), and [others](https://github.com/libuv/libuv/blob/v1.x/LINKS.md).\n\n## Feature highlights\n\n * Full-featured event loop backed by epoll, kqueue, IOCP, event ports.\n\n * Asynchronous TCP and UDP sockets\n\n * Asynchronous DNS resolution\n\n * Asynchronous file and file system operations\n\n * File system events\n\n * ANSI escape code controlled TTY\n\n * IPC with socket sharing, using Unix domain sockets or named pipes (Windows)\n\n * Child processes\n\n * Thread pool\n\n * Signal handling\n\n * High resolution clock\n\n * Threading and synchronization primitives\n\n## Versioning\n\nStarting with version 1.0.0 libuv follows the [semantic versioning](http://semver.org/)\nscheme. The API change and backwards compatibility rules are those indicated by\nSemVer. libuv will keep a stable ABI across major releases.\n\nThe ABI/API changes can be tracked [here](http://abi-laboratory.pro/tracker/timeline/libuv/).\n\n## Licensing\n\nlibuv is licensed under the MIT license. Check the [LICENSE](LICENSE) and\n[LICENSE-extra](LICENSE-extra) files.\n\nThe documentation is licensed under the CC BY 4.0 license. Check the\n[LICENSE-docs file](LICENSE-docs).\n\n## Community\n\n * [Support](https://github.com/libuv/libuv/discussions)\n * [Mailing list](http://groups.google.com/group/libuv)\n\n## Documentation\n\n### Official documentation\n\nLocated in the docs/ subdirectory. It uses the [Sphinx](http://sphinx-doc.org/)\nframework, which makes it possible to build the documentation in multiple\nformats.\n\nShow different supported building options:\n\n```bash\n$ make help\n```\n\nBuild documentation as HTML:\n\n```bash\n$ make html\n```\n\nBuild documentation as HTML and live reload it when it changes (this requires\nsphinx-autobuild to be installed and is only supported on Unix):\n\n```bash\n$ make livehtml\n```\n\nBuild documentation as man pages:\n\n```bash\n$ make man\n```\n\nBuild documentation as ePub:\n\n```bash\n$ make epub\n```\n\nNOTE: Windows users need to use make.bat instead of plain 'make'.\n\nDocumentation can be browsed online [here](http://docs.libuv.org).\n\nThe [tests and benchmarks](https://github.com/libuv/libuv/tree/master/test)\nalso serve as API specification and usage examples.\n\n### Other resources\n\n * [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4)\n   \u0026mdash; High-level introductory talk about libuv.\n * [libuv-dox](https://github.com/thlorenz/libuv-dox)\n   \u0026mdash; Documenting types and methods of libuv, mostly by reading uv.h.\n * [learnuv](https://github.com/thlorenz/learnuv)\n   \u0026mdash; Learn uv for fun and profit, a self guided workshop to libuv.\n\nThese resources are not handled by libuv maintainers and might be out of\ndate. Please verify it before opening new issues.\n\n## Downloading\n\nlibuv can be downloaded either from the\n[GitHub repository](https://github.com/libuv/libuv)\nor from the [downloads site](http://dist.libuv.org/dist/).\n\nBefore verifying the git tags or signature files, importing the relevant keys\nis necessary. Key IDs are listed in the\n[MAINTAINERS](https://github.com/libuv/libuv/blob/master/MAINTAINERS.md)\nfile, but are also available as git blob objects for easier use.\n\nImporting a key the usual way:\n\n```bash\n$ gpg --keyserver pool.sks-keyservers.net --recv-keys AE9BC059\n```\n\nImporting a key from a git blob object:\n\n```bash\n$ git show pubkey-saghul | gpg --import\n```\n\n### Verifying releases\n\nGit tags are signed with the developer's key, they can be verified as follows:\n\n```bash\n$ git verify-tag v1.6.1\n```\n\nStarting with libuv 1.7.0, the tarballs stored in the\n[downloads site](http://dist.libuv.org/dist/) are signed and an accompanying\nsignature file sit alongside each. Once both the release tarball and the\nsignature file are downloaded, the file can be verified as follows:\n\n```bash\n$ gpg --verify libuv-1.7.0.tar.gz.sign\n```\n\n## Build Instructions\n\nFor UNIX-like platforms, including macOS, there are two build methods:\nautotools or [CMake][].\n\nFor Windows, [CMake][] is the only supported build method and has the\nfollowing prerequisites:\n\n\u003cdetails\u003e\n\n* One of:\n  * [Visual C++ Build Tools][]\n  * [Visual Studio 2015 Update 3][], all editions\n    including the Community edition (remember to select\n    \"Common Tools for Visual C++ 2015\" feature during installation).\n  * [Visual Studio 2017][], any edition (including the Build Tools SKU).\n    **Required Components:** \"MSbuild\", \"VC++ 2017 v141 toolset\" and one of the\n    Windows SDKs (10 or 8.1).\n* Basic Unix tools required for some tests,\n  [Git for Windows][] includes Git Bash\n  and tools which can be included in the global `PATH`.\n\n\u003c/details\u003e\n\nTo build with autotools:\n\n```bash\n$ sh autogen.sh\n$ ./configure\n$ make\n$ make check\n$ make install\n```\n\nTo build with [CMake][]:\n\n```bash\n$ cmake -B build -DBUILD_TESTING=ON         # generate project with tests\n$ cmake --build build                       # add `-j \u003cn\u003e` with cmake \u003e= 3.12\n\n# Run tests:\n$ (cd build \u0026\u0026 ctest -C Debug --output-on-failure)\n\n# Or manually run tests:\n$ build/uv_run_tests                        # shared library build\n$ build/uv_run_tests_a                      # static library build\n```\n\nTo cross-compile with [CMake][] (unsupported but generally works):\n\n```bash\n$ cmake ../..                 \\\n  -DCMAKE_SYSTEM_NAME=Windows \\\n  -DCMAKE_SYSTEM_VERSION=6.1  \\\n  -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc\n```\n\n### Install with Homebrew\n\n```bash\n$ brew install --HEAD libuv\n```\n\nNote to OS X users:\n\nMake sure that you specify the architecture you wish to build for in the\n\"ARCHS\" flag. You can specify more than one by delimiting with a space\n(e.g. \"x86_64 i386\").\n\n### Install with vcpkg\n\n```bash\n$ git clone https://github.com/microsoft/vcpkg.git\n$ ./bootstrap-vcpkg.bat # for powershell\n$ ./bootstrap-vcpkg.sh # for bash\n$ ./vcpkg install libuv\n```\n\n### Install with Conan\n\nYou can install pre-built binaries for libuv or build it from source using [Conan](https://conan.io/). Use the following command:\n\n```bash\nconan install --requires=\"libuv/[*]\" --build=missing\n```\n\nThe libuv Conan recipe is kept up to date by Conan maintainers and community contributors.\nIf the version is out of date, please [create an issue or pull request](https://github.com/conan-io/conan-center-index) on the ConanCenterIndex repository.\n\n\n### Running tests\n\nSome tests are timing sensitive. Relaxing test timeouts may be necessary\non slow or overloaded machines:\n\n```bash\n$ env UV_TEST_TIMEOUT_MULTIPLIER=2 build/uv_run_tests # 10s instead of 5s\n```\n\n#### Run one test\n\nThe list of all tests is in `test/test-list.h`.\n\nThis invocation will cause the test driver to fork and execute `TEST_NAME` in\na child process:\n\n```bash\n$ build/uv_run_tests_a TEST_NAME\n```\n\nThis invocation will cause the test driver to execute the test in\nthe same process:\n\n```bash\n$ build/uv_run_tests_a TEST_NAME TEST_NAME\n```\n\n#### Debugging tools\n\nWhen running the test from within the test driver process\n(`build/uv_run_tests_a TEST_NAME TEST_NAME`), tools like gdb and valgrind\nwork normally.\n\nWhen running the test from a child of the test driver process\n(`build/uv_run_tests_a TEST_NAME`), use these tools in a fork-aware manner.\n\n##### Fork-aware gdb\n\nUse the [follow-fork-mode](https://sourceware.org/gdb/onlinedocs/gdb/Forks.html) setting:\n\n```\n$ gdb --args build/uv_run_tests_a TEST_NAME\n\n(gdb) set follow-fork-mode child\n...\n```\n\n##### Fork-aware valgrind\n\nUse the `--trace-children=yes` parameter:\n\n```bash\n$ valgrind --trace-children=yes -v --tool=memcheck --leak-check=full --track-origins=yes --leak-resolution=high --show-reachable=yes --log-file=memcheck-%p.log build/uv_run_tests_a TEST_NAME\n```\n\n### Running benchmarks\n\nSee the section on running tests.\nThe benchmark driver is `./uv_run_benchmarks_a` and the benchmarks are\nlisted in `test/benchmark-list.h`.\n\n## Supported Platforms\n\nCheck the [SUPPORTED_PLATFORMS file](SUPPORTED_PLATFORMS.md).\n\n### `-fno-strict-aliasing`\n\nIt is recommended to turn on the `-fno-strict-aliasing` compiler flag in\nprojects that use libuv. The use of ad hoc \"inheritance\" in the libuv API\nmay not be safe in the presence of compiler optimizations that depend on\nstrict aliasing.\n\nMSVC does not have an equivalent flag but it also does not appear to need it\nat the time of writing (December 2019.)\n\n### AIX Notes\n\nAIX compilation using IBM XL C/C++ requires version 12.1 or greater.\n\nAIX support for filesystem events requires the non-default IBM `bos.ahafs`\npackage to be installed.  This package provides the AIX Event Infrastructure\nthat is detected by `autoconf`.\n[IBM documentation](http://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/)\ndescribes the package in more detail.\n\n### z/OS Notes\n\nz/OS compilation requires [ZOSLIB](https://github.com/ibmruntimes/zoslib) to be installed. When building with [CMake][], use the flag `-DZOSLIB_DIR` to specify the path to [ZOSLIB](https://github.com/ibmruntimes/zoslib):\n\n```bash\n$ (cd build \u0026\u0026 cmake .. -DBUILD_TESTING=ON -DZOSLIB_DIR=/path/to/zoslib)\n$ cmake --build build\n```\n\nz/OS creates System V semaphores and message queues. These persist on the system\nafter the process terminates unless the event loop is closed.\n\nUse the `ipcrm` command to manually clear up System V resources.\n\n## Patches\n\nSee the [guidelines for contributing][].\n\n[CMake]: https://cmake.org/\n[node.js]: http://nodejs.org/\n[guidelines for contributing]: https://github.com/libuv/libuv/blob/master/CONTRIBUTING.md\n[libuv_banner]: https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png\n[Visual C++ Build Tools]: https://visualstudio.microsoft.com/visual-cpp-build-tools/\n[Visual Studio 2015 Update 3]: https://www.visualstudio.com/vs/older-downloads/\n[Visual Studio 2017]: https://www.visualstudio.com/downloads/\n[Git for Windows]: http://git-scm.com/download/win\n","funding_links":[],"categories":["TODO scan for Android support in followings","C","Asynchronous Event Loop","Uncategorized","TODO","Networking Libraries","Events","Python ##","C++","Table of Contents","网络编程","Standard Libraries \u0026 Utility Libraries"],"sub_categories":["Uncategorized","UI Test Automation Scripting"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibuv%2Flibuv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibuv%2Flibuv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibuv%2Flibuv/lists"}