



Modern C++23 UTF utilities (UTF-8/16/32) with explicit endianness policy and comprehensive testing.
Cross-Platform Support:
- Linux: GCC 13+ or Clang 18+
- Windows: MSVC 2022 or Clang-CL 16+
- macOS: Clang 16+ (Apple Clang or LLVM)
Key Features:
- ๐ Single Bootstrap Configuration - One command for complete setup
- ๐ Security Hardened - Stack protection, ASLR, DEP, Control Flow Integrity
- โก Performance Optimized - LTO, native CPU optimization, vectorization
- ๐งช Comprehensive Testing - Unit tests, fuzz testing, sanitizers, benchmarks
- ๐ฏ Code Quality - clang-format integration, extensive warnings, static analysis
Integrated Security Scanning:
- ๐ก๏ธ SAST Scanning - Trivy, Checkov, Gitleaks, Cppcheck, Semgrep (all-in-one workflow)
- ๐ CodeQL Analysis - Advanced semantic security analysis
- ๐จ Automated Security Reports - All findings uploaded to GitHub Security tab
- ๐ Configurable Intensity - Basic/Comprehensive/Deep security scanning levels
Quick Start
Automated Setup (Recommended)
Linux/macOS:
./bootstrap_cmake.sh # Auto-detect compiler and full setup
./bootstrap_cmake.sh --compiler gcc # Force GCC
./bootstrap_cmake.sh --compiler clang # Force Clang
Windows (cmd/PowerShell):
bootstrap_cmake.bat # Auto-detect and full setup
That's it! The bootstrap script will:
- โ
Detect your platform and available compilers
- โ
Install missing tools (CMake, Conan, clang-format)
- โ
Configure optimized builds (Debug + Release)
- โ
Run comprehensive tests and benchmarks
- โ
Set up development environment
Manual Setup (Advanced)
If you prefer manual control:
# Install dependencies
conan install . -s build_type=Debug --output-folder=build --build=missing
conan install . -s build_type=Release --output-folder=build --build=missing
# Configure (using presets)
cmake --preset conan-debug # Debug build
cmake --preset conan-release # Release build
# Build
cmake --build --preset conan-debug --parallel
cmake --build --preset conan-release --parallel
# Test
build/Debug/utf_strings-tests # Linux/macOS
build\Debug\utf_strings-tests.exe # Windows
# Benchmark
build/build/utf_strings-bench --benchmark_min_time=0.1s
Advanced Compiler Configuration
The build system supports fine-grained compiler control through external flags:
# Standard optimized build
cmake --preset conan-release \
-DCOMPILER_TYPE=GCC \
-DUSE_LTO=ON \
-DUSE_NATIVE_ARCH=ON \
-DENABLE_SHARED_LIBRARY=ON
# Maximum performance build (Clang with libc++)
cmake --preset conan-release \
-DCOMPILER_TYPE=CLANG \
-DUSE_LTO=ON \
-DUSE_NATIVE_ARCH=ON \
-DUSE_LIBC_PLUS_PLUS=ON \
-DENABLE_SHARED_LIBRARY=ON
# Debug-friendly build (no aggressive optimizations)
cmake --preset conan-debug \
-DCOMPILER_TYPE=CLANG \
-DUSE_LTO=OFF \
-DUSE_NATIVE_ARCH=OFF \
-DENABLE_SHARED_LIBRARY=OFF
Available Configuration Flags:
COMPILER_TYPE: GCC|CLANG|MSVC - Explicit compiler identification
USE_LTO: ON|OFF - Link Time Optimization
USE_NATIVE_ARCH: ON|OFF - Native CPU optimization (-march=native)
USE_MSVC_LTO: ON|OFF - MSVC-specific LTO flags (/LTCG, /GL)
USE_LIBC_PLUS_PLUS: ON|OFF - Use libc++ instead of libstdc++ (Clang only)
ENABLE_SHARED_LIBRARY: ON|OFF - Build shared libraries
๐ค AI Assistant Integration
This project includes comprehensive context files to help AI assistants (ChatGPT, Claude, GitHub Copilot) provide accurate assistance:
Context Files
- **
.ai-context** - Complete project overview, standards, and guidelines
- **
.copilot-instructions.md** - GitHub Copilot-specific coding patterns and conventions
For Best AI Assistance
When working with AI assistants on this project:
- Reference the context: "Use the project context from .ai-context"
- Specify the domain: "This is for the UTF Strings C++23 library"
- Mention requirements: "Follow the project's C++23 standards and UTF handling patterns"
- Ask for tests: "Include appropriate unit tests and consider fuzz testing"
Common AI Prompts
# For code generation
"Generate a UTF-8 to UTF-16 converter following the UTF Strings project patterns in .ai-context"
# For debugging
"Help debug this UTF conversion issue, considering the project context and C++23 standards"
# For optimization
"Optimize this UTF processing code for performance, following the project's benchmarking approach"
# For testing
"Create comprehensive tests for this UTF function, including edge cases and fuzz targets"
The AI context files ensure consistent, project-appropriate assistance across all AI platforms! ๐
Code Quality & Reviews
This project maintains high standards for production-ready C++ code:
<strong>Mandatory Code Reviews</strong>
- ๐ Code Review Guidelines - Comprehensive review parameters for all code changes
- โก Performance Analysis - Efficiency, algorithmic complexity, optimization opportunities
- ๐ Security Analysis - Memory safety, undefined behavior, vulnerability assessment
- ๐ Correctness Validation - Edge cases, error handling, logic verification
- ๐ Modern C++23 Standards - Best practices, proper feature usage, API design
<strong>Review Standards</strong>
Every change must meet:
- ๐ด Zero Critical Issues - No security vulnerabilities, undefined behavior, or crashes
- ๐ก Address Important Issues - Performance and correctness concerns resolved
- โ
Production Ready - Code must be deployable to production environments
<strong>Development Workflow</strong>
- Pre-Push Review - Complete comprehensive review using guidelines
- CI Validation - All automated tests, security scans, and quality checks pass
- Peer Review - Team review focusing on design and maintainability
- Integration - Merge only after all standards are met
See CONTRIBUTING.md for complete development guidelines.