0b0f17f64914c164d24a40c186bfc95ab3d9d39e
[platform/upstream/nodejs.git] / deps / uv / README.md
1 # libuv
2
3 libuv is a multi-platform support library with a focus on asynchronous I/O. It
4 was primarily developed for use by [Node.js](http://nodejs.org), but it's also
5 used by Mozilla's [Rust language](http://www.rust-lang.org/),
6 [Luvit](http://luvit.io/), [Julia](http://julialang.org/),
7 [pyuv](https://crate.io/packages/pyuv/), and others.
8
9 ## Feature highlights
10
11  * Full-featured event loop backed by epoll, kqueue, IOCP, event ports.
12
13  * Asynchronous TCP and UDP sockets
14
15  * Asynchronous DNS resolution
16
17  * Asynchronous file and file system operations
18
19  * File system events
20
21  * ANSI escape code controlled TTY
22
23  * IPC with socket sharing, using Unix domain sockets or named pipes (Windows)
24
25  * Child processes
26
27  * Thread pool
28
29  * Signal handling
30
31  * High resolution clock
32
33  * Threading and synchronization primitives
34
35
36 ## Community
37
38  * [Mailing list](http://groups.google.com/group/libuv)
39
40 ## Documentation
41
42  * [include/uv.h](https://github.com/joyent/libuv/blob/master/include/uv.h)
43    — API documentation in the form of detailed header comments.
44  * [An Introduction to libuv](http://nikhilm.github.com/uvbook/) — An
45    overview of libuv with tutorials.
46  * [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4) - High-level
47    introductory talk about libuv.
48  * [Tests and benchmarks](https://github.com/joyent/libuv/tree/master/test) -
49    API specification and usage examples.
50
51 ## Build Instructions
52
53 For GCC there are two methods building: via autotools or via [GYP][].
54 GYP is a meta-build system which can generate MSVS, Makefile, and XCode
55 backends. It is best used for integration into other projects.
56
57 To build with autotools:
58
59     $ sh autogen.sh
60     $ ./configure
61     $ make
62     $ make check
63     $ make install
64
65 ### Windows
66
67 First, Python 2.6 or 2.7 must be installed as it is required by [GYP][].
68
69 Also, the directory for the preferred Python executable must be specified
70 by the `PYTHON` or `Path` environment variables.
71
72 To build with Visual Studio, launch a git shell (e.g. Cmd or PowerShell)
73 and run vcbuild.bat which will checkout the GYP code into build/gyp and
74 generate uv.sln as well as related project files.
75
76 To have GYP generate build script for another system, checkout GYP into the
77 project tree manually:
78
79     $ mkdir -p build
80     $ git clone https://git.chromium.org/external/gyp.git build/gyp
81
82 ### Unix
83
84 Run:
85
86     $ ./gyp_uv.py -f make
87     $ make -C out
88
89 ### OS X
90
91 Run:
92
93     $ ./gyp_uv.py -f xcode
94     $ xcodebuild -project uv.xcodeproj -configuration Release -target All
95
96 ### Android
97
98 Run:
99
100     $ source ./android-configure NDK_PATH gyp
101     $ make -C out
102
103 Note for UNIX users: compile your project with `-D_LARGEFILE_SOURCE` and
104 `-D_FILE_OFFSET_BITS=64`. GYP builds take care of that automatically.
105
106 ### Running tests
107
108 Run:
109
110     $ ./gyp_uv.py -f make
111     $ make -C out
112     $ ./out/Debug/run-tests
113
114 ## Supported Platforms
115
116 Microsoft Windows operating systems since Windows XP SP2. It can be built
117 with either Visual Studio or MinGW. Consider using
118 [Visual Studio Express 2010][] or later if you do not have a full Visual
119 Studio license.
120
121 Linux using the GCC toolchain.
122
123 OS X using the GCC or XCode toolchain.
124
125 Solaris 121 and later using GCC toolchain.
126
127 ## patches
128
129 See the [guidelines for contributing][].
130
131 [node.js]: http://nodejs.org/
132 [GYP]: http://code.google.com/p/gyp/
133 [Visual Studio Express 2010]: http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express
134 [guidelines for contributing]: https://github.com/joyent/libuv/blob/master/CONTRIBUTING.md