Skip to content

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
Step-by-step guide: how to use libuvInstall, first run, examples, tips and FAQs

How to get it

  1. 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 libuv

    Install with vcpkg

    ./vcpkg install libuv

    Install with Conan

    conan install --requires="libuv/[*]" --build=missing
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
libuv (this)27.3kLibraryadvanced5 days agoDevelopers building networked or I/O-heavy software in C or a language with C bindings
tokio33.6kLibraryadvanced5 days agoRust developers building network servers or clients
Alamofire42.4kLibraryintermediate5 days agoSwift developers building iOS or macOS apps that call web APIs
workerman11.5kLibraryintermediate13 days agoPHP developers who need a long-running socket or WebSocket server
vcpkg27.6kDev toolintermediate4 days agoC and C++ developers who need third-party libraries in their projects
Moya15.4kLibraryintermediate4 months agoSwift 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.