libevent VS libuv

Compare libevent vs libuv and see what are their differences.

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • OPS - Build and Run Open Source Unikernels
libevent libuv
4 25
8,283 18,743
1.5% 1.4%
8.3 8.5
26 days ago 4 days ago
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of libevent. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-12-23.
  • Looking for low footprint c++ library to build a REST client
    2 projects | | 23 Dec 2021
  • Io_uring is not an event system
    6 projects | | 17 Jun 2021
  • Packaging your Crystal app into a Flatpak
    10 projects | | 23 May 2021
    app-id: dev.geopjr.Hashbrown runtime: org.gnome.Platform runtime-version: "3.38" sdk: org.gnome.Sdk command: hashbrown finish-args: - --socket=wayland - --socket=fallback-x11 - --share=ipc cleanup: - /include - /lib/pkgconfig - /share/doc - /share/man - "*.a" - "*.la" modules: - name: libevent sources: - type: git url: tag: release-2.1.12-stable - name: hashbrown buildsystem: simple build-commands: - $(pwd)/crystal/bin/crystal build ./src/ --no-debug --release - install -D -m 0755 hashbrown /app/bin/hashbrown - install -D -m 0644 extra/Hashbrown.desktop /app/share/applications/dev.geopjr.Hashbrown.desktop - install -D -m 0644 extra/icons/logo.svg /app/share/icons/hicolor/scalable/apps/dev.geopjr.Hashbrown.svg - install -D -m 0644 extra/icons/symbolic.svg /app/share/icons/hicolor/symbolic/apps/dev.geopjr.Hashbrown-symbolic.svg post-install: - install -D -m 0644 extra/dev.geopjr.Hashbrown.metainfo.xml /app/share/metainfo/dev.geopjr.Hashbrown.metainfo.xml sources: - type: git url: tag: v1.2.0 commit: 02ecf5cc5aacc32fc484fd9e348d2b1220168295 - type: archive dest: crystal/ url: sha256: 00211ca77758e99210ec40b8c5517b086d2ff9909e089400f6d847a95e5689a4 - type: git url: commit: 6468c57f8aa54b71c766d27b1e59e87a09ee8552 dest: lib/gobject - type: git url: tag: v0.1.3 commit: f287c2c8c95579688fa5620df954d8cc1272cbbf dest: lib/compiled_license
  • C Deep
    80 projects | | 27 Feb 2021
    libevent - Event loop replacement for network servers. BSD-3-Clause


Posts with mentions or reviews of libuv. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-01-03.
  • Non blocking write to a file
    3 projects | | 3 Jan 2022
    If you want real non-blocking IO, the C standard library doesn't support this and the OS-specific APIs tend to be difficult to use (and non-portable), so I would recommend something like libuv.
  • Ask HN: Where are the resources for complex architectures for Node.js?
    5 projects | | 30 Dec 2021
    My biggest pointer would be to remember that Java & JavaScript aren't named that way by coincidence. They're two different approaches to a similar problem. Java suffers from Enterprise Development (eg: Enterprise FizzBuzz[0]), JavaScript suffers from Ultimate Accessibility (eg: how many questions on Stack Overflow conflated jQuery and JS?).

    > How should exceptions be managed? [...] Has there been a debate about best practice? Where can I find it?

    I suggest you handle the errors you can and otherwise let it crash.[1][2] Debates in NodeJS-land have steered towards more monadic/Result-like structures and working synchronous-looking try/catch onto async/await. NodeJS and its various components are open source, you'll have a lot of luck looking around on GH for issues & PRs related to a feature -- same for the language, ECMAScript[3] officially.[4]

    Since you mentioned Clojure, have you looked at ClojureScript?[5] That may be a good entry to JS authors & articles you'd enjoy.

    > I have the impression that NodeJS is a bit more magical than the JVM [...] Is that correct? Where are good resources on this subject?

    As other replies have mentioned, you're really talking about V8[6] for the "JSVM" executing that code. A thing I've seen throw some people for a loop is how minimalist the specification actually is.[7] The magic in NodeJS is certainly from V8 and the rate of optimizations there but also libuv,[8] what actually powers the infamous event loop.

    Hope that helps!


    [1]: Borrowing from Erlang, see Making reliable distributed systems in the presence of software errors, Joe Armstrong, page 104 "Error Handling Philosophy"

    [2]: _Most_ kinds of errors will cause the process to crash if you don't handle them, . Promise rejections don't (yet) though it emits an error, and callback-based APIs will always consist of an [error, data] tuple for the arguments


    [4]: Because Oracle owns the trademark, of course:



    [7]: "ECMAScript as defined here is not intended to be computationally self-sufficient; indeed, there are no provisions in this specification for input of external data or output of computed results. Instead, it is expected that the computational environment of an ECMAScript program will provide not only the objects and other facilities described in this specification but also certain environment-specific objects, whose description and behaviour are beyond the scope of this specification except to indicate that they may provide certain properties that can be accessed and certain functions that can be called from an ECMAScript program."


  • Introduction to NodeJS
    1 project | | 22 Nov 2021
    Node uses Libuv as the event loop implementation. To use a Node asynchronous API, you pass a callback function as an argument to that API function, and during the event loop, your callback is executed.
  • io_uring based networking in prod experience
    3 projects | | 3 Nov 2021
    We don't use Rust (yet) for this service, but the tokio design doc is a great read with links to other art/impl, and libuv's issue/PR about it were all great helps in "crossing into gain" territory.
  • I need a good and simple networking library for C++
    2 projects | | 6 Oct 2021
    cmake include(FetchContent) FetchContent_Declare(libuv URL "") FetchContent_MakeAvailable(libuv)
  • Entendendo o Node.js e seu funcionamento
    1 project | | 17 Sep 2021
  • Node Bindings untuk binding dari C++ pada Node.js
    5 projects | | 12 Aug 2021
  • Can i make PHP as fast as Node.js?
    2 projects | | 7 Aug 2021
  • Is nodejs single threaded or multi threaded
    1 project | | 26 Jul 2021
    IO is still mostly single threaded. Node.js is based on a library called libuv which handles all the IO.
  • How to properly port C++ classes to C?
    1 project | | 9 Jul 2021
    An interesting codebase to look for inspiration is libuv. Look at include/uv.h, especially anything pertinent to uv_handle_t. (It gets messy, but that's the ugly guts of a multi-platform C library that ultimately has a very nice public API.)

What are some alternatives?

When comparing libevent and libuv you can also consider the following projects:

Boost.Asio - Asio C++ Library

libev - Full-featured high-performance event loop loosely modelled after libevent

uvw - Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!

C++ Actor Framework - An Open Source Implementation of the Actor Model in C++

benchmarks - Some benchmarks of different languages

librespot - Open Source Spotify client library

rotor - Event loop friendly C++ actor micro-framework

GLFW - A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input