
libuv
A C library that handles asynchronous input/output and event loops across operating systems.
- Stars
- 27.3k
- Forks
- 4k
- Licence
- MIT
- Language
- C
- Last update
- 5 days ago
- Type
- Library
What it is
libuv is a C library that lets programs do many input and output tasks at once without waiting on each one, such as networking, file system work, and child processes. It hides differences between operating systems behind one interface. It was mainly built for Node.js and is also used by projects like Julia and uvloop.
- Build a TCP or UDP server that handles many connections without blocking
- Run file system operations or DNS lookups asynchronously
- Spawn and communicate with child processes
- Watch file system events and handle OS signals in an event loop
Great for
- Developers building networked or I/O-heavy software in C or a language with C bindings
- Teams that need the same async I/O code to run on Linux, macOS, and Windows
- Projects that want a stable ABI across major versions, per its versioning policy
- People studying how event loops work, using its tests and benchmarks as examples
Not ideal for
- Non-programmers or people looking for an end-user application, since it is a low-level library
- Projects that want a high-level framework with built-in HTTP routing or ORM features, since libuv provides lower-level primitives
How to get it
- 1
Install with a package manager
You'll need: A C compiler and autotools or CMake · Git
Install with Homebrew (HEAD build)
brew install --HEAD libuvInstall with vcpkg
./vcpkg install libuvInstall with Conan
conan install --requires="libuv/[*]" --build=missing - 2
Run it
- Clone the repository or install through a package manager
- Build with CMake using: cmake -B build -DBUILD_TESTING=ON, then cmake --build build
- Run the test suite with: build/uv_run_tests_a to confirm the build works
- Read the tests and benchmarks in the test/ directory for usage examples
- 3
Get the most out of it
- Read the official docs in the docs/ subdirectory, built with Sphinx via make html
- Use the tests in test/ as an API specification and usage reference
- Compile with -fno-strict-aliasing as the README recommends for projects using libuv
- Use UV_TEST_TIMEOUT_MULTIPLIER on slow machines when running timing-sensitive tests
Downloads
Strengths
- Cross-platform support across epoll, kqueue, IOCP, and event ports, per the README feature list
- MIT licensed with documented semantic versioning and a stated stable ABI across majors
- Widely used in production by Node.js and other projects, and tests double as API examples
Trade-offs
- As a C library, it requires comfort with C build tooling and memory management
- Some platform features need extra setup, such as AIX file system events needing a non-default package and z/OS needing ZOSLIB
- The README notes some third-party learning resources may be out of date
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| libuv (this) | 27.3k | Library | advanced | 5 days ago | Developers building networked or I/O-heavy software in C or a language with C bindings |
| tokio | 33.6k | Library | advanced | 6 days ago | Rust developers building network servers or clients |
| Alamofire | 42.4k | Library | intermediate | 5 days ago | Swift developers building iOS or macOS apps that call web APIs |
| workerman | 11.5k | Library | intermediate | 13 days ago | PHP developers who need a long-running socket or WebSocket server |
| vcpkg | 27.6k | Dev tool | intermediate | 4 days ago | C and C++ developers who need third-party libraries in their projects |
| Moya | 15.4k | Library | intermediate | 4 months ago | Swift developers building iOS or macOS apps that call web APIs |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.