1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00
libuv/README.md

94 lines
2.5 KiB
Markdown
Raw Normal View History

2011-12-10 01:18:18 +01:00
# libuv [![Build Status](https://secure.travis-ci.org/joyent/libuv.png)](http://travis-ci.org/joyent/libuv)
2011-09-23 10:21:09 -07:00
libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
2011-11-30 11:26:52 +07:00
Windows and libev on Unix systems. We intend to eventually contain all
2011-09-23 10:21:09 -07:00
platform differences in this library.
2011-04-18 10:17:40 -07:00
http://nodejs.org/
2011-09-23 11:03:31 -07:00
## Features
2011-09-23 11:29:31 -07:00
* Non-blocking TCP sockets
2011-09-23 11:03:31 -07:00
2011-09-23 11:29:31 -07:00
* Non-blocking named pipes
2011-09-23 11:03:31 -07:00
* UDP
2011-09-23 11:29:31 -07:00
* Timers
2011-09-23 11:03:31 -07:00
* Child process spawning
2012-08-07 00:34:36 +02:00
* Asynchronous DNS via `uv_getaddrinfo`.
2011-09-23 11:03:31 -07:00
2011-09-23 11:29:31 -07:00
* Asynchronous file system APIs `uv_fs_*`
2011-09-23 11:03:31 -07:00
2011-09-23 11:29:31 -07:00
* High resolution time `uv_hrtime`
2011-09-23 11:03:31 -07:00
2011-09-23 11:29:31 -07:00
* Current executable path look up `uv_exepath`
2011-09-23 11:03:31 -07:00
2011-09-23 11:29:31 -07:00
* Thread pool scheduling `uv_queue_work`
2011-09-23 11:03:31 -07:00
2011-09-27 13:24:51 -07:00
* ANSI escape code controlled TTY `uv_tty_t`
2011-10-09 18:33:32 -07:00
* File system events Currently supports inotify, `ReadDirectoryChangesW`
and kqueue. Event ports in the near future.
2011-09-23 11:29:31 -07:00
`uv_fs_event_t`
2011-09-23 11:03:31 -07:00
2011-10-09 18:33:32 -07:00
* IPC and socket sharing between processes `uv_write2`
2011-09-23 11:03:31 -07:00
2011-09-23 10:21:09 -07:00
## Documentation
2011-09-23 10:18:46 -07:00
* [include/uv.h](https://github.com/joyent/libuv/blob/master/include/uv.h)
— API documentation in the form of detailed header comments.
* [An Introduction to libuv](http://nikhilm.github.com/uvbook/) — An
overview of libuv with tutorials.
2011-09-23 10:18:46 -07:00
2011-09-23 10:21:09 -07:00
## Build Instructions
2011-05-11 19:56:33 -07:00
For GCC (including MinGW) there are two methods building: via normal
makefiles or via GYP. GYP is a meta-build system which can generate MSVS,
Makefile, and XCode backends. It is best used for integration into other
projects. The old (more stable) system is using Makefiles.
2011-08-03 15:07:33 -07:00
To build via Makefile simply execute:
2011-08-03 15:07:33 -07:00
make
To build with Visual Studio run the vcbuilds.bat file which will
checkout the GYP code into build/gyp and generate the uv.sln and
related files.
2011-08-03 15:07:33 -07:00
2011-09-23 11:29:31 -07:00
Windows users can also build from cmd-line using msbuild. This is
done by running vcbuild.bat from Visual Studio command prompt.
To have GYP generate build script for another system you will need to
checkout GYP into the project tree manually:
2011-08-03 15:07:33 -07:00
svn co http://gyp.googlecode.com/svn/trunk build/gyp
2011-08-24 01:11:13 -07:00
Unix users run
2011-08-24 01:11:13 -07:00
./gyp_uv -f make
make
2011-08-24 01:11:13 -07:00
Macintosh users run
2011-08-24 01:11:13 -07:00
./gyp_uv -f xcode
xcodebuild -project uv.xcodeproj -configuration Release -target All
2011-08-03 15:07:33 -07:00
2012-09-13 14:13:21 +02:00
Note for Linux users: compile your project with `-D_GNU_SOURCE` when you
include `uv.h`. GYP builds take care of that automatically. If you use
autotools, add a `AC_GNU_SOURCE` declaration to your `configure.ac`.
2011-08-03 15:07:33 -07:00
2011-09-23 10:21:09 -07:00
## Supported Platforms
2011-05-07 21:35:05 -07:00
Microsoft Windows operating systems since Windows XP SP2. It can be built
with either Visual Studio or MinGW.
Linux 2.6 using the GCC toolchain.
2011-05-07 21:35:05 -07:00
MacOS using the GCC or XCode toolchain.
2011-05-07 21:35:05 -07:00
2011-05-10 06:53:21 +00:00
Solaris 121 and later using GCC toolchain.