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 95
Async 🟨 Async I/O (files, sockets, timers, processes, fs events, threads wake-up) 5673
Async Streams 🟥 Concurrently read, write and transform byte streams 1975
Build 🟨 Minimal build system where builds are described in C++ 4159
Containers 🟨 Generic containers (SC::Vector, SC::SmallVector, SC::Array etc.) 779
File 🟩 Synchronous Disk File I/O 692
File System 🟩 File System operations { exists, copy, delete } for { files and directories } 1315
File System Iterator 🟩 Enumerates files and directories inside a given path 428
File System Watcher 🟩 Notifications {add, remove, rename, modified} for files and directories 1295
File System Watcher Async 🟩 Async backend for FileSystemWatcher 106
Foundation 🟩 Primitive types, asserts, compiler macros, Function, Span, Result 1173
Hashing 🟩 Compute MD5, SHA1 or SHA256 hashes for a stream of bytes 353
Http 🟥 HTTP parser, client and server 1260
Memory 🟩 Heap Allocation, Custom allocators, Virtual Memory, Buffer, Segment 1219
Plugin 🟨 Minimal dependency based plugin system with hot-reload 1426
Process 🟩 Create child processes and chain them (also usable with Async library) 1294
Reflection 🟩 Describe C++ types at compile time for serialization 684
Serialization Binary 🟨 Serialize to and from a binary format using Reflection 572
Serialization Text 🟨 Serialize to / from text formats (JSON) using Reflection 645
Socket 🟨 Synchronous socket networking and DNS lookup 855
Strings 🟩 String formatting / conversion / manipulation (ASCII / UTF8 / UTF16) 3362
Testing 🟨 Simple testing framework used by all of the other libraries 331
Threading 🟥 Atomic, thread, thread pool, mutex, condition variable 876
Time 🟨 Time handling (relative, absolute, high resolution) 346

Some libraries have C Bindings:

Library Description
sc_hashing