{"id":15047809,"url":"https://github.com/nthnn/ladivic","last_synced_at":"2026-01-02T11:20:57.787Z","repository":{"id":219462154,"uuid":"749114473","full_name":"nthnn/ladivic","owner":"nthnn","description":"C++ library designed to provide system-level thread- and fail-safe functions with concurrency, atomic, file I/O, IPC, memory management, and system information retrieval functionalities.","archived":false,"fork":false,"pushed_at":"2024-02-17T22:15:44.000Z","size":262,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T17:17:20.718Z","etag":null,"topics":["asynchronous-programming","atomic","atomic-design","concurrency","cplusplus","cplusplus-11","cplusplus-library","fail-safe-mechanism","ipc","memory-allocation","memory-management","mutex","mutex-lock","mutex-synchronisation","system-information"],"latest_commit_sha":null,"homepage":"https://nthnn.github.io/ladivic/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nthnn.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},"funding":{"github":"nthnn","custom":"https://www.buymeacoffee.com/nthnn"}},"created_at":"2024-01-27T16:14:44.000Z","updated_at":"2024-01-27T16:18:38.000Z","dependencies_parsed_at":"2024-01-27T17:28:13.792Z","dependency_job_id":"0c791632-6b17-4dd4-8707-1eb69cc8ab1f","html_url":"https://github.com/nthnn/ladivic","commit_stats":null,"previous_names":["nthnn/ladivic"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthnn%2Fladivic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthnn%2Fladivic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthnn%2Fladivic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthnn%2Fladivic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nthnn","download_url":"https://codeload.github.com/nthnn/ladivic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243489778,"owners_count":20298997,"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":["asynchronous-programming","atomic","atomic-design","concurrency","cplusplus","cplusplus-11","cplusplus-library","fail-safe-mechanism","ipc","memory-allocation","memory-management","mutex","mutex-lock","mutex-synchronisation","system-information"],"created_at":"2024-09-24T21:04:55.226Z","updated_at":"2026-01-02T11:20:57.752Z","avatar_url":"https://github.com/nthnn.png","language":"C++","funding_links":["https://github.com/sponsors/nthnn","https://www.buymeacoffee.com/nthnn"],"categories":[],"sub_categories":[],"readme":"## ladivic\n\n![Build Test](https://github.com/nthnn/ladivic/actions/workflows/build_test.yml/badge.svg)\n![GitHub repo size](https://img.shields.io/github/repo-size/nthnn/ladivic?logo=git\u0026label=Repository%20Size)\n\nLadivic is a C++ library designed to provide system-level thread- and fail-safe functions. It offers various functionalities related to asynchronous operations, atomic operations, input/output operations, inter-process communication (IPC), memory management, and system information retrieval. The library aims to simplify system-level programming tasks by providing robust and reliable functions that ensure thread safety and error handling. Hence, Ladivic stands as a versatile and indispensable asset for tackling complex system-level challenges with confidence and efficiency.\n\n```cpp\n#include \u003cldvc_mem.hpp\u003e\n#include \u003cldvc_type.hpp\u003e\n\n#include \u003ciostream\u003e\n\nusing namespace std;\n\ni32 main() {\n    i32* i32_array = ldvc_malloc\u003ci32\u003e(5);\n    for(usize i = 0; i \u003c 5; ++i)\n        i32_array[i] = static_cast\u003ci32\u003e(i * 10);\n\n    cout \u003c\u003c \"Original Array: \";\n    for(usize i = 0; i \u003c 5; ++i)\n        std::cout \u003c\u003c i32_array[i] \u003c\u003c \" \";\n    cout \u003c\u003c endl;\n}\n```\n\n## Features\n\n### Asynchronous Operations\n\nLadivic facilitates seamless execution of asynchronous tasks with its suite of functions designed to handle concurrency elegantly. Developers can leverage `ldvc_async_execute` to execute functions asynchronously, providing a future object for result retrieval. Additionally, tasks can be scheduled with specified delays or timeouts using `ldvc_async_execute_with_delay` and `ldvc_async_execute_with_timeout`, enabling precise control over task execution in multithreaded environments.\n\n### Atomic Operations\n\nThread safety is paramount in system-level programming, and Ladivic delivers robust atomic operations to ensure data integrity in concurrent scenarios. With functions for atomic increment, decrement, exchange, load, store, and bitwise operations (AND, OR, XOR), developers can manipulate variables atomically with ease, safeguarding against race conditions and data corruption.\n\n### Input/Output Operations\n\nEfficient handling of input/output operations is critical for system-level applications, and Ladivic streamlines this process with its input/output module. Developers can effortlessly read and write data to files using `ldvc_io.hpp`, with additional support for checking file existence and creating folders seamlessly, enhancing file management capabilities in system-level applications.\n\n### Inter-Process Communication (IPC)\n\nFacilitating communication between processes is essential for building robust system-level applications, and Ladivic simplifies this process with its IPC module. By providing functions for creating, attaching, detaching, and destroying shared memory segments, Ladivic empowers developers to implement efficient inter-process communication mechanisms, enabling seamless data exchange and synchronization between processes.\n\n### Memory Management\n\nEffective memory management is fundamental for optimizing system-level applications, and Ladivic offers powerful memory management functionalities to address this need. Developers can safely allocate and deallocate memory using thread-safe functions in the `ldvc_mem.hpp` module, ensuring efficient utilization of system resources and minimizing memory-related issues.\n\n### System Information Retrieval\n\nAccessing essential system information is vital for system-level applications, and Ladivic simplifies this process with its system information retrieval module. Developers can retrieve critical system information such as CPU details, total memory, and disk space using functions in the `ldvc_sysinfo.hpp` module, enabling comprehensive system monitoring and analysis capabilities.\n\n## Installation\n\nOn GNU/Linux systems, you can simply change the working directory to ladivic, type the following to your terminal:\n\n```bash\nsudo chmod +x install.sh\nsudo ./install.sh\n```\n\nThis will install the ladivic header files to the header path.\n\n---\n\nTo incorporate Ladivic into your C++ project, follow these simple steps:\n\n1. Clone the Ladivic repository to your local machine:\n\n```bash\ngit clone https://github.com/nthnn/ladivic.git\n```\n\n2. Include the necessary header files in your C++ code:\n\n```cpp\n#include \"ldvc_async.hpp\"\n#include \"ldvc_atomic.hpp\"\n#include \"ldvc_io.hpp\"\n#include \"ldvc_ipc.hpp\"\n#include \"ldvc_mem.hpp\"\n#include \"ldvc_sysinfo.hpp\"\n#include \"ldvc_type.hpp\"\n```\n\n3. During compilation, ensure the Ladivic library is linked to your project.\n\nOr, you can compile the [examples](examples) by:\n\n```bash\nqrepo run build\n```\n\nJust make sure you have [Qrepo](https://github.com/nthnn/Qrepo) and [CMake](https://cmake.org) installed on your system.\n\n## Contributing\n\nContributions to Ladivic are highly encouraged and appreciated! To contribute new features, bug fixes, or enhancements, please adhere to the following guidelines:\n\n1. Fork the Ladivic repository.\n2. Create a new branch for your changes: `git checkout -b feature-name`.\n3. Implement your changes and commit them: `git commit -m \"Added new feature\"`.\n4. Push your changes to the branch: `git push origin feature-name`.\n5. Submit a pull request for review and inclusion.\n\n## License\n\nLadivic is distributed under the GNU General Public License v3.0. For further details, refer to the [LICENSE](https://github.com/nthnn/ladivic/tree/main/LICENSE) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnthnn%2Fladivic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnthnn%2Fladivic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnthnn%2Fladivic/lists"}