1 [![Build Status](https://travis-ci.org/Reactive-Extensions/RxCpp.png)](https://travis-ci.org/Reactive-Extensions/RxCpp)
5 * Rx.NET: The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators.
6 * RxJS: The Reactive Extensions for JavaScript (RxJS) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in JavaScript which can target both the browser and Node.js.
7 * RxCpp: The Reactive Extensions for Native (RxC) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++.
9 # Interactive Extensions
10 * Ix: The Interactive Extensions (Ix) is a .NET library which extends LINQ to Objects to provide many of the operators available in Rx but targeted for IEnumerable<T>.
11 * IxJS: An implementation of LINQ to Objects and the Interactive Extensions (Ix) in JavaScript.
12 * Ix++: An implantation of LINQ for Native Developers in C++
15 * Tx: a set of code samples showing how to use LINQ to events, such as real-time standing queries and queries on past history from trace and log files, which targets ETW, Windows Event Logs and SQL Server Extended Events.
16 * LINQ2Charts: an example for Rx bindings. Similar to existing APIs like LINQ to XML, it allows developers to use LINQ to create/change/update charts in an easy way and avoid having to deal with XML or other underneath data structures. We would love to see more Rx bindings like this one.
20 * RxCpp is regularly tested on OSX and Windows.
21 * RxCpp is regularly built with Clang and VC
22 * RxCpp depends on the latest compiler releases.
23 * RxCpp has an experimental build with gcc.
25 RxCpp uses CMake to create build files for several platforms and IDE's
32 cmake -G"Xcode" ../CMake -B.
39 cmake -G"Visual Studio 12" ..\CMake -B.
41 * Note: open in VC2013 and upgrade to the 2013 toolset
49 cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -B. ../CMake
57 cmake -G"Unix Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -B. ../CMake
65 cmake -G"Unix Makefiles" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -B. ../CMake
73 cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -B. ..\CMake
77 The build only produces a test binary.
81 * You can use the CMake test runner ```ctest```
82 * You can run the test binary directly ```rxcppv2_test```
83 * Tests can be selected by name or tag
86 ```rxcppv2_test [perf]```
89 Add ```Rx/v2/src``` to the include paths
92 #include "rxcpp/rx.hpp"
93 // create alias' to simplify code
94 // these are owned by the user so that
95 // conflicts can be managed by the user.
97 namespace rxu=rxcpp::util;
98 namespace rxsc=rxcpp::schedulers;
99 namespace rxsub=rxcpp::subjects;
101 // At this time, RxCpp will fail to compile if the contents
102 // of the std namespace are merged into the global namespace
103 // DO NOT USE: 'using namespace std;'
106 int wmain(int argc, wchar_t** argv)
108 int main(int argc, char** argv)
114 rx::observable<>::range(1)
117 return rx::observable<>::range(1, z)
120 return rx::observable<>::range(x, z)
121 .filter([=, &c](int y){++c; return x*x + y*y == z*z;})
122 .map([=](int y){return std::make_tuple(x, y, z);})
123 // forget type to workaround lambda deduction bug on msvc 2013
125 [](int x, std::tuple<int,int,int> triplet){return triplet;})
126 // forget type to workaround lambda deduction bug on msvc 2013
128 [](int z, std::tuple<int,int,int> triplet){return triplet;});
134 .subscribe(rxu::apply_to([&ct](int x,int y,int z){
138 std::cout << "concat_map pythagorian range : " << c << " filtered to, " << ct << " triplets" << std::endl;
146 Before submitting a feature or substantial code contribution please discuss it with the team and ensure it follows the product roadmap. Note that all code submissions will be rigorously reviewed and tested by the Rx Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source.
148 You will need to submit a Contributor License Agreement form before submitting your pull request. This needs to only be done once for any Microsoft OSS project. Fill in the [Contributor License Agreement](https://cla.msopentech.com/) (CLA).