{"id":15108758,"url":"https://github.com/reactivex/rxcpp","last_synced_at":"2026-03-10T02:04:00.006Z","repository":{"id":38848166,"uuid":"12584062","full_name":"ReactiveX/RxCpp","owner":"ReactiveX","description":"Reactive Extensions for C++","archived":false,"fork":false,"pushed_at":"2024-07-30T22:41:39.000Z","size":63094,"stargazers_count":3168,"open_issues_count":102,"forks_count":405,"subscribers_count":156,"default_branch":"main","last_synced_at":"2025-12-13T03:15:18.621Z","etag":null,"topics":["algorithms","c-plus-plus","reactivex","rxcpp","values-distributed-in-time","virtuous-procrastination"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReactiveX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-09-04T06:56:36.000Z","updated_at":"2025-12-13T01:27:23.000Z","dependencies_parsed_at":"2024-01-29T17:17:05.807Z","dependency_job_id":"34bf83b4-314c-495f-a73a-c00da40774d1","html_url":"https://github.com/ReactiveX/RxCpp","commit_stats":{"total_commits":848,"total_committers":70,"mean_commits":"12.114285714285714","dds":"0.41273584905660377","last_synced_commit":"761b932a80e2be6e2b62d232e754bd96fc448946"},"previous_names":["reactive-extensions/rxcpp"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ReactiveX/RxCpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxCpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxCpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxCpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxCpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReactiveX","download_url":"https://codeload.github.com/ReactiveX/RxCpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxCpp/sbom","scorecard":{"id":118911,"data":{"date":"2025-08-11","repo":{"name":"github.com/ReactiveX/RxCpp","commit":"761b932a80e2be6e2b62d232e754bd96fc448946"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/rxcpp-ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":5,"reason":"Found 16/30 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rxcpp-ci.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/ReactiveX/RxCpp/rxcpp-ci.yml/main?enable=pin","Warn: downloadThenRun not pinned by hash: projects/scripts/travis-install.sh:12","Warn: downloadThenRun not pinned by hash: .github/workflows/rxcpp-ci.yml:149","Warn: downloadThenRun not pinned by hash: .github/workflows/rxcpp-ci.yml:159","Warn: downloadThenRun not pinned by hash: .github/workflows/rxcpp-ci.yml:169","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license.md:0","Info: FSF or OSI recognized license: Apache License 2.0: license.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T02:06:02.555Z","repository_id":38848166,"created_at":"2025-08-16T02:06:02.555Z","updated_at":"2025-08-16T02:06:02.555Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30322637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","c-plus-plus","reactivex","rxcpp","values-distributed-in-time","virtuous-procrastination"],"created_at":"2024-09-25T22:24:42.154Z","updated_at":"2026-03-10T02:03:54.989Z","avatar_url":"https://github.com/ReactiveX.png","language":"C++","readme":"The Reactive Extensions for C++ (__RxCpp__) is a library of algorithms for values-distributed-in-time. The [__Range-v3__](https://github.com/ericniebler/range-v3) library does the same for values-distributed-in-space.\n\nTask    | Status | \n----------- | :------------ |\nrxcpp CI | [![rxcpp CI](https://img.shields.io/github/workflow/status/ReactiveX/RxCpp/rxcpp%20CI/main.svg?event=push\u0026style=flat-square)](https://github.com/ReactiveX/RxCpp/actions/workflows/rxcpp-ci.yml)\n\nSource        | Badges |\n------------- | :--------------- |\nGithub | [![GitHub license](https://img.shields.io/github/license/ReactiveX/RxCpp.svg?style=flat-square)](https://github.com/ReactiveX/RxCpp) \u003cbr/\u003e [![GitHub release](https://img.shields.io/github/release/ReactiveX/RxCpp.svg?style=flat-square)](https://github.com/ReactiveX/RxCpp/releases) \u003cbr/\u003e [![GitHub commits](https://img.shields.io/github/commits-since/ReactiveX/RxCpp/4.1.0.svg?style=flat-square)](https://github.com/ReactiveX/RxCpp)\nGitter.im | [![Join in on gitter.im](https://img.shields.io/gitter/room/Reactive-Extensions/RxCpp.svg?style=flat-square)](https://gitter.im/ReactiveX/RxCpp?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\nPackages | [![NuGet version](http://img.shields.io/nuget/v/RxCpp.svg?style=flat-square)](http://www.nuget.org/packages/RxCpp/) [![vcpkg port](https://img.shields.io/badge/vcpkg-port-blue.svg?style=flat-square)](https://github.com/Microsoft/vcpkg/tree/master/ports/rxcpp)\nDocumentation | [![rxcpp doxygen documentation](https://img.shields.io/badge/rxcpp-latest-brightgreen.svg?style=flat-square)](http://reactivex.github.io/RxCpp) \u003cbr/\u003e [![reactivex intro](https://img.shields.io/badge/reactivex.io-intro-brightgreen.svg?style=flat-square)](http://reactivex.io/intro.html) [![rx marble diagrams](https://img.shields.io/badge/rxmarbles-diagrams-brightgreen.svg?style=flat-square)](http://rxmarbles.com/)\n\n# Usage\n\n__RxCpp__ is a header-only C++ library that only depends on the standard library. The CMake build generates documentation and unit tests. The unit tests depend on a git submodule for the [Catch](https://github.com/philsquared/Catch) library.\n\n# Example\nAdd `Rx/v2/src` to the include paths\n\n[![lines from bytes](https://img.shields.io/badge/blog%20post-lines%20from%20bytes-blue.svg?style=flat-square)](http://kirkshoop.github.io/async/rxcpp/c++/2015/07/07/rxcpp_-_parsing_bytes_to_lines_of_text.html)\n\n```cpp\n#include \"rxcpp/rx.hpp\"\nnamespace Rx {\nusing namespace rxcpp;\nusing namespace rxcpp::sources;\nusing namespace rxcpp::operators;\nusing namespace rxcpp::util;\n}\nusing namespace Rx;\n\n#include \u003cregex\u003e\n#include \u003crandom\u003e\nusing namespace std;\nusing namespace std::chrono;\n\nint main()\n{\n    random_device rd;   // non-deterministic generator\n    mt19937 gen(rd());\n    uniform_int_distribution\u003c\u003e dist(4, 18);\n\n    // for testing purposes, produce byte stream that from lines of text\n    auto bytes = range(0, 10) |\n        flat_map([\u0026](int i){\n            auto body = from((uint8_t)('A' + i)) |\n                repeat(dist(gen)) |\n                as_dynamic();\n            auto delim = from((uint8_t)'\\r');\n            return from(body, delim) | concat();\n        }) |\n        window(17) |\n        flat_map([](observable\u003cuint8_t\u003e w){\n            return w |\n                reduce(\n                    vector\u003cuint8_t\u003e(),\n                    [](vector\u003cuint8_t\u003e v, uint8_t b){\n                        v.push_back(b);\n                        return v;\n                    }) |\n                as_dynamic();\n        }) |\n        tap([](const vector\u003cuint8_t\u003e\u0026 v){\n            // print input packet of bytes\n            copy(v.begin(), v.end(), ostream_iterator\u003clong\u003e(cout, \" \"));\n            cout \u003c\u003c endl;\n        });\n\n    //\n    // recover lines of text from byte stream\n    //\n    \n    auto removespaces = [](string s){\n        s.erase(remove_if(s.begin(), s.end(), ::isspace), s.end());\n        return s;\n    };\n\n    // create strings split on \\r\n    auto strings = bytes |\n        concat_map([](vector\u003cuint8_t\u003e v){\n            string s(v.begin(), v.end());\n            regex delim(R\"/(\\r)/\");\n            cregex_token_iterator cursor(\u0026s[0], \u0026s[0] + s.size(), delim, {-1, 0});\n            cregex_token_iterator end;\n            vector\u003cstring\u003e splits(cursor, end);\n            return iterate(move(splits));\n        }) |\n        filter([](const string\u0026 s){\n            return !s.empty();\n        }) |\n        publish() |\n        ref_count();\n\n    // filter to last string in each line\n    auto closes = strings |\n        filter(\n            [](const string\u0026 s){\n                return s.back() == '\\r';\n            }) |\n        Rx::map([](const string\u0026){return 0;});\n\n    // group strings by line\n    auto linewindows = strings |\n        window_toggle(closes | start_with(0), [=](int){return closes;});\n\n    // reduce the strings for a line into one string\n    auto lines = linewindows |\n        flat_map([\u0026](observable\u003cstring\u003e w) {\n            return w | start_with\u003cstring\u003e(\"\") | sum() | Rx::map(removespaces);\n        });\n\n    // print result\n    lines |\n        subscribe\u003cstring\u003e(println(cout));\n\n    return 0;\n}\n```\n\n# Reactive Extensions\n\n\u003eThe ReactiveX Observable model allows you to treat streams of asynchronous events with the same sort of simple, composable operations that you use for collections of data items like arrays. It frees you from tangled webs of callbacks, and thereby makes your code more readable and less prone to bugs.\n\nCredit [ReactiveX.io](http://reactivex.io/intro.html)\n\n### Other language implementations\n\n* Java: [RxJava](https://github.com/ReactiveX/RxJava)\n* JavaScript: [rxjs](https://github.com/ReactiveX/rxjs)\n* C#: [Rx.NET](https://github.com/Reactive-Extensions/Rx.NET)\n* [More..](http://reactivex.io/languages.html)\n\n### Resources\n\n* [Intro](http://reactivex.io/intro.html)\n* [Tutorials](http://reactivex.io/tutorials.html)\n* [Marble Diagrams](http://rxmarbles.com/)\n* [twitter stream analysis app](https://github.com/kirkshoop/twitter)\n  * [![baldwin pass to wilson](https://img.youtube.com/vi/QkvCzShHyVU/0.jpg)](https://www.youtube.com/watch?v=QkvCzShHyVU)\n* _Algorithm Design For Values Distributed In Time_\n  * [![C++ Russia 2016](https://img.youtube.com/vi/Re6DS5Ff0uE/0.jpg)](https://www.youtube.com/watch?v=Re6DS5Ff0uE)\n  * [![CppCon 2016](https://img.youtube.com/vi/FcQURwM806o/0.jpg)](https://www.youtube.com/watch?v=FcQURwM806o)\n\n# Cloning RxCpp\n\nRxCpp uses a git submodule (in `ext/catch`) for the excellent [Catch](https://github.com/philsquared/Catch) library. The easiest way to ensure that the submodules are included in the clone is to add `--recursive` in the clone command.\n\n```shell\ngit clone --recursive https://github.com/ReactiveX/RxCpp.git\ncd RxCpp\n```\n\n# Installing\n\nTo install RxCpp into your OS you need to follow standart procedure:\n```shell\nmkdir build\ncd build\ncmake ..\nmake install \n```\n\nIf you're using the vcpkg dependency manager, you can install RxCpp using a single one-line command:\n\n```\nvcpkg install rxcpp\n```\n\nVcpkg will acquire RxCpp, build it from source in your computer, and provide CMake integration support for your projects.\n\nSee the [vcpkg repository](https://github.com/Microsoft/vcpkg) for more information.\n\n# Importing\n\nAfter you have successfully installed RxCpp you can import it into any project by simply adding to your CMakeLists.txt:\n```cmake\nfind_package(rxcpp CONFIG)\n``` \n\n# Building RxCpp Unit Tests\n\n* RxCpp is regularly tested on OSX and Windows.\n* RxCpp is regularly built with Clang, Gcc and VC\n* RxCpp depends on the latest compiler releases.\n\nRxCpp uses CMake to create build files for several platforms and IDE's\n\n### ide builds\n\n#### XCode\n```shell\nmkdir projects/build\ncd projects/build\ncmake -G\"Xcode\" -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=0 ../CMake -B.\n```\n\n#### Visual Studio 2017\n```batch\nmkdir projects\\build\ncd projects\\build\ncmake -G \"Visual Studio 15\" -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=0 ..\\CMake\\\nmsbuild Project.sln\n```\n\n### makefile builds\n\n#### OSX\n```shell\nmkdir projects/build\ncd projects/build\ncmake -G\"Unix Makefiles\" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=0 -B. ../CMake\nmake\n```\n\n#### Linux --- Clang\n```shell\nmkdir projects/build\ncd projects/build\ncmake -G\"Unix Makefiles\" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXE_LINKER_FLAGS=\"-stdlib=libc++\" -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=0 -B. ../CMake\nmake\n```\n\n#### Linux --- GCC\n```shell\nmkdir projects/build\ncd projects/build\ncmake -G\"Unix Makefiles\" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=0 -B. ../CMake\nmake\n```\n\n#### Windows\n```batch\nmkdir projects\\build\ncd projects\\build\ncmake -G\"NMake Makefiles\" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DRXCPP_DISABLE_TESTS_AND_EXAMPLES=0 -B. ..\\CMake\nnmake\n```\n\nThe build only produces test and example binaries.\n\n# Running tests\n\n* You can use the CMake test runner `ctest`\n* You can run the test binaries directly `rxcpp_test_*`\n* Tests can be selected by name or tag\nExample of by-tag\n\n`rxcpp_test_subscription [perf]`\n\n# Documentation\n\nRxCpp uses Doxygen to generate project [documentation](http://reactivex.github.io/RxCpp).\n\nWhen Doxygen+Graphviz is installed, CMake creates a special build task named `doc`. It creates actual documentation and puts it to `projects/doxygen/html/` folder, which can be published to the `gh-pages` branch. Each merged pull request will build the docs and publish them.\n\n[Developers Material](DeveloperManual.md)\n\n# Contributing Code\n\nBefore 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.\n\n# Microsoft Open Source Code of Conduct\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactivex%2Frxcpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freactivex%2Frxcpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freactivex%2Frxcpp/lists"}