The node.js project began in 2009 as a JavaScript environment decoupled from the browser. Using Google’s V8 and Marc Lehmann’s libev, node.js combined a model of I/O – evented – with a language that was well suited to the style of programming; due to the way it had been shaped by browsers. As node.js grew in popularity, it was important to make it work on Windows, but libev ran only on Unix. The Windows equivalent of kernel event notification mechanisms like kqueue or (e)poll is IOCP. libuv was an abstraction around libev or IOCP depending on the platform, providing users an API based on libev. In the node-v0.9.0 version of libuv libev was removed. Since then libuv has continued to mature and become a high quality standalone library for system programming. Users outside of node.js include Mozilla’s Rust programming language, and a variety of language bindings. |
---|
libuv (Unicorn Velociraptor Library[2]) is a multi-platform C library that provides support for asynchronous I/O based on event loops. It supports epoll(4), kqueue(2), Windows IOCP, and Solaris event ports. It is primarily designed for use in Node.js but it is also used by other software projects.[3] It was originally an abstraction around libev or Microsoft IOCP, as libev doesn't support Windows. In node-v0.9.0's version of libuv, the dependency on libev was removed.[4] |
Features |
---|
Full-featured event loop backed by epoll, kqueue, IOCP, event ports. |
Asynchronous TCP and UDP sockets |
Asynchronous DNS resolution |
Asynchronous file and file system operations |
File system events ANSI escape code controlled TTY |
IPC with socket sharing, using Unix domain sockets or named pipes (Windows) |
Child processes |
Thread pool |
Signal handling |
High resolution clock |
Threading and synchronization primitives |