Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
Sane C++ Libraries

Table of Contents

Sane C++ Libraries is a set of C++ platform abstraction libraries for macOS, Windows and Linux. Platforms.

Project 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)

Motivation

  • Having fun building from scratch a cohesive ecosystem of libraries sharing the same core principles
  • Fight bloat measured in cognitive and build complexity, compile time, binary size and debug performance
  • Providing out-of-the-box functionalities typically given for granted in every respectable modern language
  • Re-invent the wheel hoping it will be more round this time

You can take a look at the introductory blog post if you like.

I've also started a Youtube Channel with some videos on the project.

Status

Many libraries are in draft state, while others are slightly more usable.
Click on specific page each library to know about its status.

  • 🟥 Draft (incomplete, work in progress, proof of concept, works on basic case)
  • 🟨 MVP (minimum set of features have been implemented)
  • 🟩 Usable (a reasonable set of features has been implemented to make library useful)
  • 🟦 Complete (all planned features have been implemented)

It is a deliberate decision to prototype single libraries and make them public Draft or MVP state.
This is done so that they can be matured in parallel with all other libraries and evolve their API more naturally.

This is the list of all libraries, whose internal dependencies are documented at Dependencies:

Library Description LOC
Algorithms 🟥 Placeholder library templated where algorithms will be placed 96
Async 🟨 Async I/O (files, sockets, timers, processes, fs events, threads wake-up) 5533
Async Streams 🟥 Concurrently read, write and transform byte streams 2008
Build 🟨 Minimal build system where builds are described in C++ 4094
Containers 🟨 Generic containers (SC::Vector, SC::SmallVector, SC::Array etc.) 773
File 🟩 Synchronous Disk File I/O 700
File System 🟩 File System operations { exists, copy, delete } for { files and directories } 1323
File System Iterator 🟩 Enumerates files and directories inside a given path 417
File System Watcher 🟩 Notifications {add, remove, rename, modified} for files and directories 1227
Foundation 🟩 Primitive types, asserts, limits, Function, Span, Result 1532
Hashing 🟩 Compute MD5, SHA1 or SHA256 hashes for a stream of bytes 359
Http 🟥 HTTP parser, client and server 1299
Memory 🟩 Heap Allocation, Custom allocators, Virtual Memory, Buffer, Segment 1247
Plugin 🟨 Minimal dependency based plugin system with hot-reload 1464
Process 🟩 Create child processes and chain them (also usable with Async library) 1283
Reflection 🟩 Describe C++ types at compile time for serialization 701
Serialization Binary 🟨 Serialize to and from a binary format using Reflection 594
Serialization Text 🟨 Serialize to / from text formats (JSON) using Reflection 661
Socket 🟨 Synchronous socket networking and DNS lookup 858
Strings 🟩 String formatting / conversion / manipulation (ASCII / UTF8 / UTF16) 3388
Testing 🟨 Simple testing framework used by all of the other libraries 303
Threading 🟥 Atomic, thread, thread pool, mutex, condition variable 888
Time 🟨 Time handling (relative, absolute, high resolution) 359

Some libraries have C Bindings:

Library Description
sc_hashing