libuv status report
We announced back in July that with Microsoft's support Joyent would be porting Node to Windows. This effort is ongoing but I thought it would be nice to make a status report post about the new platform library
libuv which has resulted from porting Node to Windows.
libuv's purpose is to abstract platform-dependent code in Node into one place where it can be tested for correctness and performance before bindings to V8 are added. Since Node is totally non-blocking,
libuv turns out to be a rather useful library itself: a BSD-licensed, minimal, high-performance, cross-platform networking library.
We attempt to not reinvent the wheel where possible. The entire Unix backend sits heavily on Marc Lehmann's beautiful libraries libev and libeio. For DNS we integrated with Daniel Stenberg's C-Ares. For cross-platform build-system support we're relying on Chrome's GYP meta-build system.
The current implemented features are:
- Non-blocking TCP sockets (using IOCP on Windows)
- Non-blocking named pipes
- Child process spawning
- Asynchronous DNS via c-ares or
- Asynchronous file system APIs
- High resolution time
- Current executable path look up
- Thread pool scheduling
- File system events (Currently supports inotify,
ReadDirectoryChangesWand will support kqueue and event ports in the near future.)
- VT100 TTY
- Socket sharing between processes
uv_ipc_t (planned API)
libuv supports Microsoft Windows operating systems since Windows XP SP2. It can be built with either Visual Studio or MinGW. Solaris 121 and later using GCC toolchain. Linux 2.6 or better using the GCC toolchain. Macinotsh Darwin using the GCC or XCode toolchain. It is known to work on the BSDs but we do not check the build regularly.
In addition to Node v0.5, a number of projects have begun to use
- Mozilla's Rust
- Tim Caswell's LuaNode
- Ben Noordhuis and Bert Belder's Phode async PHP project
- Kerry Snyder's libuv-csharp
- Andrea Lattuada's web server
libuvin the future!