Platform Abstraction C++ Libraries
See the codeSane C++ Libraries is a set of C++ platform abstraction libraries for macOS, Windows and Linux, built for Agents.
Principles:
✅ Fast compile times
✅ Bloat free
✅ Simple and readable code
✅ Easy to integrate
⛔️ No C++ Standard Library / Exceptions / RTTI
⛔️ No third party build dependencies (prefer OS API)
Libraries are designed to be used as Single File Libraries with minimal dependencies between them and follow a strict No Allocations (*) policy.
| Library | Description | Single File |
|---|---|---|
| Async | 🟨 Async I/O (files, sockets, timers, processes, fs events, tasks) | Download |
| Async Fibers | 🟥 Stackful fiber I/O bridge over Async | Download |
| Async Streams | 🟨 Concurrently read, write and transform byte streams | Download |
| Await | 🟨 C++20 coroutine layer over Async | Download |
| Containers | 🟨 Generic containers (SC::Vector, SC::SmallVector, SC::Array) | Download |
| Containers Reflection | 🟨 Containers specializations for Reflection and Serialization | Download |
| Cryptography | 🟥 OS-backed symmetric cryptography primitives | Download |
| Fibers | 🟥 Stackful cooperative task runtime | Download |
| File | 🟩 Synchronous Disk File I/O | Download |
| File System | 🟩 File System operations (like copy / delete) for files / dirs | Download |
| File System Iterator | 🟩 Enumerates files and directories inside a given path | Download |
| File System Watcher | 🟩 Notifications {add,remove,rename,modify} for files / dirs | Download |
| Foundation | 🟩 Primitive types, asserts, macros, Function, Span, Result | Download |
| Hashing | 🟩 Compute MD5, SHA1 or SHA256 hashes for bytes streams | Download |
| Http | 🟥 HTTP parser, client and server | Download |
| Http Client | 🟥 Streaming-first HTTP client with native OS backends | Download |
| Memory | 🟩 Custom allocators, Virtual Memory, Buffer, Segment | Download |
| Plugin | 🟨 Minimal dependency based plugin system with hot-reload | Download |
| Process | 🟩 Create child processes and redirect their input / output | Download |
| Reflection | 🟩 Describe C++ types at compile time for serialization | Download |
| SerialPort | 🟨 Serial port configuration and handling | Download |
| Serialization Binary | 🟨 Serialize to and from a binary format using Reflection | Download |
| Serialization Text | 🟨 Serialize to / from text formats (JSON) using Reflection | Download |
| Socket | 🟨 Synchronous socket networking and DNS lookup | Download |
| Strings | 🟩 String formatting / conversion / manipulation (UTF8 / UTF16) | Download |
| Testing | 🟨 Simple testing framework used by all of the other libraries | Download |
| Threading | 🟩 Atomic, thread, mutex, semaphore, barrier, rw-lock, condition | Download |
| Time | 🟨 Time handling (relative, absolute, high resolution) | Download |
Each library is color-coded to signal its status:
🟥 Draft (incomplete, WIP, works on basic test cases)
🟨 MVP (a minimum set of features has been implemented)
🟩 Usable (a reasonable set of useful features has been implemented)
Point your agent at repository Skills.
main branch using the Single File Library browser app#include SaneCppLIBRARY.h in your headers#define SANE_CPP_IMPLEMENTATION + #include "SaneCppLIBRARY.h" in one of your .cpp filesSee Building (user) for details on the (system) libraries to link.
Libraries/[Library]/*.h)See Building (user) for details on the (system) libraries to link.
AsyncWebServer and a more advanced SCExample an Async event loop integration with a GUI and usage of Plugin.std:: ones, are fully supported (see InteropSTL for an example).std:: or to any other equivalent containers library, and they're totally optional.Documentation is automatically generated using Doxygen and updated at every commit to main branch.
@pagghiu_Contributions are issue-first and agent-friendly; see CONTRIBUTING.md for the current workflow.
Sane C++ Libraries are licensed under the MIT License, see LICENSE.txt for more information.
On this YouTube Channel there are some videos showing bits of the development process.
On Sane Coding Blog there is a series of posts about this project.
Relevant yearly posts:
1,492 followers · starred Dec 2023
414 followers · starred Jan 2024
261 followers · starred Jan 2024
73 followers · starred Dec 2023
Platform Abstraction C++ Libraries
See the codeSane C++ Libraries is a set of C++ platform abstraction libraries for macOS, Windows and Linux, built for Agents.
Principles:
✅ Fast compile times
✅ Bloat free
✅ Simple and readable code
✅ Easy to integrate
⛔️ No C++ Standard Library / Exceptions / RTTI
⛔️ No third party build dependencies (prefer OS API)
Libraries are designed to be used as Single File Libraries with minimal dependencies between them and follow a strict No Allocations (*) policy.
| Library | Description | Single File |
|---|---|---|
| Async | 🟨 Async I/O (files, sockets, timers, processes, fs events, tasks) | Download |
| Async Fibers | 🟥 Stackful fiber I/O bridge over Async | Download |
| Async Streams | 🟨 Concurrently read, write and transform byte streams | Download |
| Await | 🟨 C++20 coroutine layer over Async | Download |
| Containers | 🟨 Generic containers (SC::Vector, SC::SmallVector, SC::Array) | Download |
| Containers Reflection | 🟨 Containers specializations for Reflection and Serialization | Download |
| Cryptography | 🟥 OS-backed symmetric cryptography primitives | Download |
| Fibers | 🟥 Stackful cooperative task runtime | Download |
| File | 🟩 Synchronous Disk File I/O | Download |
| File System | 🟩 File System operations (like copy / delete) for files / dirs | Download |
| File System Iterator | 🟩 Enumerates files and directories inside a given path | Download |
| File System Watcher | 🟩 Notifications {add,remove,rename,modify} for files / dirs | Download |
| Foundation | 🟩 Primitive types, asserts, macros, Function, Span, Result | Download |
| Hashing | 🟩 Compute MD5, SHA1 or SHA256 hashes for bytes streams | Download |
| Http | 🟥 HTTP parser, client and server | Download |
| Http Client | 🟥 Streaming-first HTTP client with native OS backends | Download |
| Memory | 🟩 Custom allocators, Virtual Memory, Buffer, Segment | Download |
| Plugin | 🟨 Minimal dependency based plugin system with hot-reload | Download |
| Process | 🟩 Create child processes and redirect their input / output | Download |
| Reflection | 🟩 Describe C++ types at compile time for serialization | Download |
| SerialPort | 🟨 Serial port configuration and handling | Download |
| Serialization Binary | 🟨 Serialize to and from a binary format using Reflection | Download |
| Serialization Text | 🟨 Serialize to / from text formats (JSON) using Reflection | Download |
| Socket | 🟨 Synchronous socket networking and DNS lookup | Download |
| Strings | 🟩 String formatting / conversion / manipulation (UTF8 / UTF16) | Download |
| Testing | 🟨 Simple testing framework used by all of the other libraries | Download |
| Threading | 🟩 Atomic, thread, mutex, semaphore, barrier, rw-lock, condition | Download |
| Time | 🟨 Time handling (relative, absolute, high resolution) | Download |
Each library is color-coded to signal its status:
🟥 Draft (incomplete, WIP, works on basic test cases)
🟨 MVP (a minimum set of features has been implemented)
🟩 Usable (a reasonable set of useful features has been implemented)
Point your agent at repository Skills.
main branch using the Single File Library browser app#include SaneCppLIBRARY.h in your headers#define SANE_CPP_IMPLEMENTATION + #include "SaneCppLIBRARY.h" in one of your .cpp filesSee Building (user) for details on the (system) libraries to link.
Libraries/[Library]/*.h)See Building (user) for details on the (system) libraries to link.
AsyncWebServer and a more advanced SCExample an Async event loop integration with a GUI and usage of Plugin.std:: ones, are fully supported (see InteropSTL for an example).std:: or to any other equivalent containers library, and they're totally optional.Documentation is automatically generated using Doxygen and updated at every commit to main branch.
@pagghiu_Contributions are issue-first and agent-friendly; see CONTRIBUTING.md for the current workflow.
Sane C++ Libraries are licensed under the MIT License, see LICENSE.txt for more information.
On this YouTube Channel there are some videos showing bits of the development process.
On Sane Coding Blog there is a series of posts about this project.
Relevant yearly posts:
1,492 followers · starred Dec 2023
414 followers · starred Jan 2024
261 followers · starred Jan 2024
73 followers · starred Dec 2023