54740ca935dc112d1f72bbbe969089ffafdc88d8
[platform/upstream/nodejs.git] / deps / uv / README.md
1 # libuv
2
3 libuv is a new platform layer for Node. Its purpose is to abstract IOCP on
4 Windows and epoll/kqueue/event ports/etc. on Unix systems. We intend to
5 eventually contain all platform differences in this library.
6
7 http://nodejs.org/
8
9 ## Features
10
11  * Non-blocking TCP sockets
12
13  * Non-blocking named pipes
14
15  * UDP
16
17  * Timers
18
19  * Child process spawning
20
21  * Asynchronous DNS via `uv_getaddrinfo`.
22
23  * Asynchronous file system APIs `uv_fs_*`
24
25  * High resolution time `uv_hrtime`
26
27  * Current executable path look up `uv_exepath`
28
29  * Thread pool scheduling `uv_queue_work`
30
31  * ANSI escape code controlled TTY `uv_tty_t`
32
33  * File system events Currently supports inotify, `ReadDirectoryChangesW`
34    and kqueue. Event ports in the near future.
35    `uv_fs_event_t`
36
37  * IPC and socket sharing between processes `uv_write2`
38
39 ## Community
40
41  * [Mailing list](http://groups.google.com/group/libuv)
42
43 ## Documentation
44
45  * [include/uv.h](https://github.com/joyent/libuv/blob/master/include/uv.h)
46    — API documentation in the form of detailed header comments.
47  * [An Introduction to libuv](http://nikhilm.github.com/uvbook/) — An
48    overview of libuv with tutorials.
49  * [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4) - High-level
50    introductory talk about libuv.
51  * [Tests and benchmarks](https://github.com/joyent/libuv/tree/master/test) -
52    API specification and usage examples.
53
54 ## Build Instructions
55
56 For GCC (including MinGW) there are two methods building: via normal
57 makefiles or via GYP. GYP is a meta-build system which can generate MSVS,
58 Makefile, and XCode backends. It is best used for integration into other
59 projects.  The old system is using plain GNU Makefiles.
60
61 To build via Makefile simply execute:
62
63     make
64
65 MinGW users should run this instead:
66
67     make PLATFORM=mingw
68
69 Out-of-tree builds are supported:
70
71     make builddir_name=/path/to/builddir
72
73 To build with Visual Studio run the vcbuild.bat file which will
74 checkout the GYP code into build/gyp and generate the uv.sln and
75 related files.
76
77 Windows users can also build from cmd-line using msbuild.  This is
78 done by running vcbuild.bat from Visual Studio command prompt.
79
80 To have GYP generate build script for another system, make sure that
81 you have Python 2.6 or 2.7 installed, then checkout GYP into the
82 project tree manually:
83
84     mkdir -p build
85     svn co http://gyp.googlecode.com/svn/trunk build/gyp
86
87 Or:
88
89     mkdir -p build
90     git clone https://git.chromium.org/external/gyp.git build/gyp
91
92 Unix users run
93
94     ./gyp_uv -f make
95     make -C out
96
97 Macintosh users run
98
99     ./gyp_uv -f xcode
100     xcodebuild -project uv.xcodeproj -configuration Release -target All
101
102 Note for UNIX users: compile your project with `-D_LARGEFILE_SOURCE` and
103 `-D_FILE_OFFSET_BITS=64`. GYP builds take care of that automatically.
104
105 Note for Linux users: compile your project with `-D_GNU_SOURCE` when you
106 include `uv.h`. GYP builds take care of that automatically. If you use
107 autotools, add a `AC_GNU_SOURCE` declaration to your `configure.ac`.
108
109 ## Supported Platforms
110
111 Microsoft Windows operating systems since Windows XP SP2. It can be built
112 with either Visual Studio or MinGW.
113
114 Linux 2.6 using the GCC toolchain.
115
116 MacOS using the GCC or XCode toolchain.
117
118 Solaris 121 and later using GCC toolchain.