update readme

This commit is contained in:
2025-12-15 21:54:52 +05:30
parent 4d5d06c3c0
commit 534767ced9
2 changed files with 72 additions and 10 deletions

View File

@ -1,9 +1,19 @@
# IACore (Independent Architecture Core)
![License](https://img.shields.io/badge/license-GPLv3-blue.svg)
![Standard](https://img.shields.io/badge/C%2B%2B-20-yellow.svg)
![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux-lightgrey.svg)
<div align="center">
<img src="logo.svg" alt="IACore Logo" width="400"/>
<br/>
<img src="https://img.shields.io/badge/license-GPLv3-blue.svg" alt="License"/>
<img src="https://img.shields.io/badge/standard-C%2B%2B20-yellow.svg" alt="C++ Standard"/>
<img src="https://img.shields.io/badge/platform-Windows%20%7C%20Linux-lightgrey.svg" alt="Platform"/>
<p>
<b>The Battery-Included Foundation for High-Performance C++ Applications.</b>
</p>
</div>
## 📖 Description
IACore is a high-performance, battery-included C++20 foundation library designed to eliminate "dependency hell." It bundles essential systems—IPC, Logging, Networking, Compression, and Async Scheduling—into a single, coherent API.
Originally developed as the internal core for IASoft (PVT) LTD., it is now open-source to provide a standardized bedrock for C++ applications.
@ -35,17 +45,16 @@ target_link_libraries(MyApp PRIVATE IACore)
## 📦 Dependencies
IACore manages its own dependencies via CMake's FetchContent. You do not need to install these manually:
* nlohmann_json & glaze (JSON Parsing)
* cpp-httplib (Networking)
* zlib-ng & zstd (Compression)
* tl-expected (Error Handling)
* **JSON:** `nlohmann_json`, `glaze`, & `simdjson`
* **Networking:** `cpp-httplib`
* **Compression:** `zlib-ng` & `zstd`
* **Utilities:** `tl-expected` & `unordered_dense`
## 💡 Usage Examples
### 1. IPC (Manager & Node)
IACore provides a manager/node architecture using shared memory.
Manager:
#### Manager:
```C++
#include <IACore/IPC.hpp>
@ -58,6 +67,36 @@ String msg = "Hello Node";
manager.SendPacket(*nodeID, 100, {(PCUINT8)msg.data(), msg.size()});
```
#### Node:
```C++
#include <IACore/IPC.hpp>
class Node : public IACore::IPC_Node {
public:
void OnSignal(uint8_t signal) override {
// Handle signals
}
void OnPacket(uint16_t packetID, std::span<const uint8_t> payload) override {
// Handle packets
}
};
int main(int argc, char* argv[]) {
// The connection string is passed as the first argument by the Manager
if (argc < 2) return -1;
Node node;
// Connect back to the manager via Shared Memory
if (!node.Connect(argv[1])) return -1;
while(true) {
node.Update();
}
return 0;
}
```
### 2. Async Jobs
```C++
@ -81,7 +120,7 @@ IACore::AsyncOps::WaitForScheduleCompletion(mySchedule);
```C++
#include <IACore/HttpClient.hpp>
IACore::HttpClient client("[https://api.example.com](https://api.example.com)");
IACore::HttpClient client("https://api.example.com");
auto res = client.JsonGet<MyResponseStruct>("/data", {});
if (res) {