Erbsland Core Documentation
Erbsland Core is a cross-platform C++20 foundation library for building secure, portable applications with little boilerplate. It provides a consistent API for Linux, macOS, and Windows and depends only on the C++ standard library.
Warning
Erbsland Core is in alpha. The available status is already useful for experiments and new applications, but the public API can change without a compatibility period. See Development Stages and Versioning for details.
Build elgrep — Start the Tutorial →
Choose Your Starting Point
Build a practical recursive search tool using the application framework, paths, streams, regular expressions, and safe terminal output.
Integrate Core as a Git submodule, configure its build, or consume an installed static library.
Learn the concepts and patterns behind individual library areas.
Look up public types, functions, and detailed behavior by API area.
Check compiler, CMake, Git, platform, and contributor-tool requirements.
Features Available Today
Text, data, and utilities
Unicode-aware strings, text, and formatting for UTF-8, UTF-16, and UTF-32
A safe, reliable regular-expression engine
Byte and text streams, text encodings, and buffers
Filesystem paths, file and directory operations, and file streams
Date and time types, durations, and system-independent time-zone calculation
Safe numeric utilities, including saturating arithmetic and checked conversions
Fast and secure random-number generators with safe APIs
Copy-on-write containers, coroutine primitives, enum flags, compression, and more
Template render framework with a Jinja like syntax.
Applications and system integration
Command-line option parsing with formatted help and version output
An application framework and application-part management to minimize boilerplate
A resource system for automatically compiled-in resources
Terminal output with colors, styles, cursor movement, and terminal-size detection
Error classes, diagnostics, and formatted diagnostic output
The Erbsland Configuration Language, including validation rules
Bounded asynchronous logging with hierarchical streams, runtime reconfiguration, and statistics
Events and networking
Event loops, schedulers, timers, function invocation, and event threads
Event-based TCP and UDP connections, host-name resolution, and more
A TLS 1.3 network layer over TCP
An event-based HTTP server and client framework for plain TCP and TLS
Cryptography
An extensive cryptography layer with no dependency on other libraries
All Documentation
- Getting Started
- Usage
- Topics
- Core
- Core Application Framework
- Choosing an Application Design
- Writing Small Applications with Functions
- Building Event-Driven Applications
- Building Procedural Applications
- Building Command-Style Applications
- Building an Application from Parts
- Designing Application Parts
- Running Application Parts Independently
- Creating Services and Foreground Daemons
- Adding Git Version Information to Your App
- Memory
- Working with Bits and Bytes
- Reading a Stream of Bits
- Working with Predefined Byte-Spans
- Working with Fixed Byte Arrays
- Working with Byte Blocks
- Byte Integer Formats Explained
- Using Byte Buffers
- Using Byte Ring Buffers
- Reading and Parsing Byte Streams
- Writing Byte Streams
- Encoding Text in Binary Byte Streams
- Compressing Data
- Designing Custom Copy-on-Write Containers
- Marking Unsafe Memory Access in Code
- Compiled Resources
- Security Topics
- Cryptology
- Text
- Text in Erbsland Core
- Using Strings
- String Attributes
- Transforming Strings
- Editing Strings in Place
- Managing StringEditor Storage
- Finding Text Positions
- Slicing and Splitting Strings
- Character Access and Parsing of Strings
- Converting Text and Scalar Values
- Comparing Whole and Partial Strings
- Normalizing Unicode Strings
- Working with Character Sets
- Building Strings
- Formatting Text Patterns
- Format Specifications
- Compatibility Format Specifications
- Recognizing Text Patterns
- Converting Strings
- Encoding Internationalized Names
- Command Line Options System
- Exceptions, Errors and Diagnostics
- Filesystem Access and Manipulation
- Random and Secrets
- Regular Expressions
- Event System
- Logging
- Logging Overview
- Choosing a Logging Setup
- Writing Log Messages
- Configuring Logging in Code
- Formatting Log Lines
- Configuring Log Manager Limits
- Using Trace Sections
- Using Log Writers
- Writing Logs to the Console
- Writing Logs to Files
- Sending Logs to Syslog
- Loading Logging Configuration
- Writing an ELCL Logging Configuration
- Streams
- Working with Streams
- Creating Streams and Managing Ownership
- Byte Input and Output
- Text Input, Output, and Encoding
- Standard Streams
- Readiness and Timeouts
- Buffering and Back Pressure
- Stream Lifecycle
- Temporary Streams
- Positioning Streams
- Stream Errors and Diagnostics
- Coroutine Streams
- Writing Custom Streams
- Network
- Color Terminal
- Core
- Reference
- Block Reference
- Configuration Language Reference
- Core Functionality
- Cryptology
- Cterm Reference
- Debug Reference
- Error Handling Reference
- Event Reference
- Geometry Reference
- Internationalization Reference
- Log Reference
- Mathematical Types and Functions
- Memory Related Types and Functions
- Network Reference
- Options Reference
- Path Reference
- Random Generator
- Regular Expression Reference
- Compiled Resources
- Stream Reference
- System Support
- Text Processing
- Time Reference
- Unit Types and Functions
- Utility Types and Functions
- The Story Behind Erbsland Core
- Development Stages and Versioning
- Requirements
- Changelog
- Guidelines
- Erbsland C++ Code Style
- CMake Build Files Structure
- Guidelines for File Structures
- Platform Integration Guidelines
- ReStructuredText Style
- Topic Page Guidelines
- Reference Page Guidelines
- Writing Style
- Guidelines for Writing Demos
- Guidelines for Writing Examples and Demos
- Themes and Languages for Examples and Demos
- Bad Code and Anti-Patterns
- Cryptographic Algorithm Documentation
- How to Write API Guidelines
- Common API Guidelines
- Block Geometry Domain API Guidelines
- Geometry API Guidelines
- Configuration Domain API Guidelines
- Core Application API Guidelines
- Cryptology Domain API Guidelines
- Core Semantics
- Primary Types
- Secondary Types
- X.509 Identity Patterns
- Hash Selection Patterns
- Hashing Patterns
- Message Authentication Patterns
- Key Derivation Patterns
- Symmetric Encryption Patterns
- Cryptology Configuration Patterns
- TLS Configuration Parser Patterns
- Protected Data Patterns
- Key Agreement Patterns
- Password Hashing Patterns
- X.509 Certificate Patterns
- Signature Verification Patterns
- TLS 1.3 Record Protection Patterns
- Color Terminal Domain API Guidelines
- Core Semantics
- Primary Types
- Buffer Types
- Drawing Types
- Input Types
- Terminal Integration Types
- Document Types
- Pattern Definitions
- Block and Style Patterns
- Buffer Read Patterns
- Buffer Write Patterns
- Cursor Write Patterns
- Terminal Patterns
- Input Patterns
- Interactive Read Patterns
- Document Rendering Patterns
- Error Domain API Guidelines
- Event Domain API Guidelines
- Internationalization API Guidelines
- Log Domain API Guidelines
- Math Domain API Guidelines
- Memory Domain API Guidelines
- Core Semantics
- Primary Types
- Secondary Types
- Compression Types
- Pattern Definitions
- Internal Byte Tool Patterns
- Byte Value Patterns
- Byte Sequence Read Patterns
- Mutable Byte Sequence Patterns
- Shared Block Patterns
- Integer Access Patterns
- Sequential Read and Write Patterns
- Ring Buffer Patterns
- Byte Compression Patterns
- Sensitive Byte Storage Patterns
- Shared Storage Patterns
- Compiled Resource API Guidelines
- Network Domain API Guidelines
- Options Domain API Guidelines
- Path API Guidelines
- Random Domain API Guidelines
- Regular Expression API Guidelines
- Stream API Guidelines
- System Domain API Guidelines
- Text Domain API Guidelines
- Core Semantics
- Primary Types
- Processing Types
- Formatting and Parsing Types
- Collection and Pattern Types
- Document Types
- Layout Renderer Types
- Codec Types
- Pattern Definitions
- String Value Patterns
- String Editing Patterns
- Reader and Split Patterns
- Conversion and Encoding Patterns
- Formatting and Parsing Patterns
- Sensitive UTF-8 Patterns
- Document Patterns
- JSON Value Patterns
- Layout Renderer Patterns
- Base-N Codec Patterns
- Punycode and IDNA Patterns
- Time Domain API Guidelines
- Unit and Value Domain API Guidelines
- Utilities API Guidelines
The Guidelines section is contributor material for developing Core itself.