{"id":28279911,"url":"https://github.com/acrion/cbeam","last_synced_at":"2025-06-16T17:30:53.127Z","repository":{"id":288669720,"uuid":"918189681","full_name":"acrion/Cbeam","owner":"acrion","description":"A modern, cross-platform, header-only C++ library for concurrency, memory management, containers, and more","archived":false,"fork":false,"pushed_at":"2025-04-18T21:32:45.000Z","size":182,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-21T09:16:08.370Z","etag":null,"topics":["abi-stability","boost","concurrency","cpp","header-only","serialization"],"latest_commit_sha":null,"homepage":"https://cbeam.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acrion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"acrion","liberapay":"acrion","buy_me_a_coffee":"acrion","patreon":"acriondev"}},"created_at":"2025-01-17T12:31:23.000Z","updated_at":"2025-04-18T21:32:48.000Z","dependencies_parsed_at":"2025-04-20T12:48:13.363Z","dependency_job_id":null,"html_url":"https://github.com/acrion/Cbeam","commit_stats":null,"previous_names":["acrion/cbeam"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/acrion/Cbeam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrion%2FCbeam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrion%2FCbeam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrion%2FCbeam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrion%2FCbeam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acrion","download_url":"https://codeload.github.com/acrion/Cbeam/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrion%2FCbeam/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260204346,"owners_count":22974115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["abi-stability","boost","concurrency","cpp","header-only","serialization"],"created_at":"2025-05-21T09:16:04.191Z","updated_at":"2025-06-16T17:30:53.118Z","avatar_url":"https://github.com/acrion.png","language":"C++","funding_links":["https://github.com/sponsors/acrion","https://liberapay.com/acrion","https://buymeacoffee.com/acrion","https://patreon.com/acriondev"],"categories":[],"sub_categories":[],"readme":"[**Cbeam**](https://cbeam.org) is a **modern, cross-platform, header-only C++ library** covering essential functionality in:\n\n- [Concurrency](https://cbeam.org/doxygen/namespacecbeam_1_1concurrency.html)\n- [Containers](https://cbeam.org/doxygen/namespacecbeam_1_1container.html)\n- [Conversion](https://cbeam.org/doxygen/namespacecbeam_1_1convert.html)\n- [Encoding](https://cbeam.org/doxygen/namespacecbeam_1_1encoding.html)\n- [Filesystem interaction](https://cbeam.org/doxygen/namespacecbeam_1_1filesystem.html)\n- [JSON](https://cbeam.org/doxygen/namespacecbeam_1_1json.html)\n- [Lifecycle management](https://cbeam.org/doxygen/namespacecbeam_1_1lifecycle.html)\n- [Logging](https://cbeam.org/doxygen/namespacecbeam_1_1logging.html)\n- [Memory](https://cbeam.org/doxygen/namespacecbeam_1_1memory.html)\n- [Platform abstraction](https://cbeam.org/doxygen/namespacecbeam_1_1platform.html)\n- [Random generation](https://cbeam.org/doxygen/namespacecbeam_1_1random.html)\n- [Serialization](https://cbeam.org/doxygen/namespacecbeam_1_1serialization.html)\n\nWhile it draws inspiration from Boost’s coding style and extensive use of templates, **Cbeam** imposes **no Boost dependency**, making it lightweight to integrate into projects on **Linux**, **macOS**, and **Windows** alike. Comprehensive Doxygen documentation and thorough unit tests ensure clarity and reliability.\n\n---\n\n## Spotlight Features\n\n### 1. Asynchronous Message Dispatching\nThe [`message_manager`](https://cbeam.org/message_manager) simplifies multithreading by letting you send messages (with FIFO, FILO, or RANDOM order) to one or more handler threads:\n```cpp\ncbeam::concurrency::message_manager\u003cint\u003e manager;\nmanager.add_handler(1, [](int msg) { /* handle msg */ });\nmanager.send_message(1, 42); \n// Thread-safe, flexible, and easy to wait_until_empty() for a clean finish\n```\nDesigned with performance, customizable ordering, and thread-safe enqueuing in mind—particularly beneficial for distributing complex workloads.\n\n### 2. Cross-Platform Shared Memory Without Hassle\n[`interprocess_shared_memory`](https://cbeam.org/interprocess_shared_memory) unifies Windows and Unix APIs in a simple header-only approach:\n```cpp\ncbeam::memory::interprocess_shared_memory shm(\"UniqueName\", 4096);\n// Windows: Uses native file mapping (avoids \"C:\\ProgramData\\boost_interprocess\")\n// Linux/Unix: Uses ephemeral POSIX shm_open without leftover kernel objects\n```\nNo leftover kernel objects or complicated file permission setups. Once all processes detach, the memory is automatically cleaned up.\n\n### 3. Stable Reference Counting Across Shared Libraries\nIf you’ve ever battled `std::shared_ptr` mismatches across DLLs or plugins, [`stable_reference_buffer`](https://cbeam.org/stable_reference_buffer) solves the problem:\n```cpp\ncbeam::container::stable_reference_buffer buf(10, sizeof(int));\n{\n    auto copy = buf;\n    // Both references track the same block, \n    // and the refcount remains correct even if libraries differ in compiler/ABI\n}\n```\nThe reference count is stored in a safe, process-wide map, preventing double-free or missing deletions in plugin systems.\n\n### 4. Interoperable Containers Across Compiler Boundaries\nA family of \"stable interprocess\" containers (e.g., [`stable_interprocess_map`](https://cbeam.org/interprocess_containers)) lets you store data structures in shared memory while bridging incompatible ABIs. Automatic serialization keeps the container stable even when libraries use different compilers:\n```cpp\ncbeam::container::stable_interprocess_map\u003cstd::string, int\u003e sharedMap;\n// Insert data from one shared library...\nsharedMap[\"answer\"] = 42;\n// ...read from another library built with a different toolchain\n```\nNo more binary compatibility nightmares—Cbeam’s [Interprocess Containers](https://cbeam.org/interprocess_containers) abstract the underlying complexity and ensure consistent data exchange.\n\n---\n\n## Additional Highlights\n\n- **Thread Management**: CRTP-based [`threaded_object`](https://cbeam.org/threaded_object) spares you from boilerplate, giving a well-defined worker thread lifecycle.  \n- **Nested Maps and JSON**: Easily manage hierarchical data with [`nested_map`](https://cbeam.org/nested_map) and optional JSON or binary serialization.\n- **Logging \u0026 Lifecycle**: Central logging, plus robust singletons that can be reset at will ([`singleton_control`](https://cbeam.org/singleton)) to handle complex initialization or teardown scenarios.\n\n---\n\n## Comprehensive Documentation and Testing\n\nAll classes and functions are thoroughly documented with Doxygen, providing up-to-date usage details. An extensive suite of unit tests and concurrency stress tests backs every feature. \n\n---\n\n## Licensing\n\nCbeam is dual-licensed:\n\n1. **AGPL v3 or later** for open-source use,\n2. **Commercial licensing** for closed-source integration or special requirements.\n\nWe would like to emphasize that offering a dual license does not restrict users of the normal open-source license (including commercial users). The dual licensing model is designed to support both open-source collaboration and commercial integration needs. For commercial licensing inquiries, please contact us at [https://acrion.ch/sales](https://acrion.ch/sales).\n\n---\n\n**Discover how Cbeam can streamline your C++ concurrency, cross-library data sharing, and memory management.** Explore the linked pages for deeper insights into each component. Enjoy clean code, minimal dependencies, and a reliable, modern C++ experience.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facrion%2Fcbeam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facrion%2Fcbeam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facrion%2Fcbeam/lists"}