Sane C++ Libraries

Cross-platform C++ libraries for coding agents.

✅ Agent-ready✅ Fast compile times✅ Easy to integrate✅ Bloat-free⛔️ No external dependencies⛔️ No hidden allocations⛔️ Not a framework
Library and platform map for Sane C++ Libraries
Cross-platform Targets macOS, Windows, and Linux on x86_64 and ARM64.
600+ GitHub stars Still growing
25 Libraries Cross-platform building blocks
1 Skill Repo skill available now
3 Platforms macOS, Windows, Linux
Philosophy

The Sane way

Sane C++ Libraries are built to be compact, efficient, inspectable, and careful about side effects. The design consistently encourages explicit resource ownership and error handling across the API surface. Coding agents can use the included skills to find the right constraints quickly and build useful software without guessing.

Dependency map for Sane C++ Libraries
The reasons

Why should you care?

Sane C++ Libraries blends the compactness of single-file libraries with the convenience of a small runtime. You can start with one library, a unity-build checkout, or the full SC::Build workflow without turning your project into a framework.

Independent libraries

A small amount of code duplication is accepted in order to keep many libraries isolated.

Working like a runtime

It brings ready-to-use runtime pieces that C++ projects often miss, closer to what developers expect from JavaScript or Python.

Composable by design

Libraries stay useful on their own, but their explicit boundaries make them easy to combine when a project grows.

Contributions

PR means Prompt Request

The maintainer should be able to recreate or adapt the work from a clean checkout. The prompt is evaluated as durable context, not as a demand for byte-identical code.

Title: HttpClient: Add a request timeout option
Objective: fail requests that take too long
Context: fit the existing streaming-first design
Constraints: no hidden allocations, preserve platform backends
Validation: run the focused HttpClient tests in Debug
Open the repository skill
Catalog

Full list

Use the catalog to pick the smallest useful building block for your project or Prompt Request.

Library
Status / Description
Download
Async
MVP Async I/O (files, sockets, timers, processes, fs events, threads wake-up)
SaneCppAsync.h
Async Streams
MVP Concurrently read, write and transform byte streams
SaneCppAsyncStreams.h
Await
MVP / Experimental C++20 coroutine layer over Async
SaneCppAwait.h
Containers
MVP Generic containers (SC::Vector, SC::SmallVector, SC::Array etc.)
SaneCppContainers.h
Containers Reflection
Usable Containers specializations for Reflection and Serialization.
SaneCppContainersReflection.h
File
Usable Synchronous Disk File I/O
SaneCppFile.h
File System
Usable File System operations { exists, copy, delete } for { files and directories }
SaneCppFileSystem.h
File System Iterator
Usable Enumerates files and directories inside a given path
SaneCppFileSystemIterator.h
File System Watcher
Usable Notifications {add, remove, rename, modified} for files and directories
SaneCppFileSystemWatcher.h
Foundation
Usable Primitive types, asserts, compiler macros, Function, Span, Result
SaneCppFoundation.h
Hashing
Usable Compute MD5, SHA1 or SHA256 hashes for a stream of bytes
SaneCppHashing.h
Http
Draft HTTP parser, server and client
SaneCppHttp.h
Http Client
Draft Streaming-first HTTP client with native OS backends
SaneCppHttpClient.h
Memory
Usable Heap Allocation, Custom allocators, Virtual Memory, Buffer, Segment
SaneCppMemory.h
Plugin
MVP Minimal dependency based plugin system with hot-reload
SaneCppPlugin.h
Process
Usable Create child processes and chain them (also usable with Async library)
SaneCppProcess.h
Reflection
Usable Describe C++ types at compile time for serialization
SaneCppReflection.h
Serialization Binary
MVP Serialize to and from a binary format using Reflection
SaneCppSerializationBinary.h
Serialization Text
MVP Serialize to / from text formats (JSON) using Reflection
SaneCppSerializationText.h
SerialPort
MVP Synchronous serial port descriptor and configuration
SaneCppSerialPort.h
Socket
MVP Synchronous socket networking and DNS lookup
SaneCppSocket.h
Strings
Usable String formatting / conversion / manipulation (ASCII / UTF8 / UTF16)
SaneCppStrings.h
Testing
MVP Simple testing framework used by all of the other libraries
SaneCppTesting.h
Threading
Usable Atomic, thread, thread pool, mutex, semaphore, barrier, rw-lock, condition variable
SaneCppThreading.h
Time
MVP Time handling (relative, absolute, high resolution)
SaneCppTime.h