UTF Strings Library v1.3.0
High-performance UTF string processing library for C++23
Loading...
Searching...
No Matches
UTF Strings - Cross-Platform C++23 Library

CI/CD Pipeline SAST Security Scanning CodeQL Security Analysis Extended Fuzz Testing Release Validation

C++23 CMake Conan License

Linux Windows macOS

Performance Security Quality

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:

  1. Reference the context: "Use the project context from .ai-context"
  2. Specify the domain: "This is for the UTF Strings C++23 library"
  3. Mention requirements: "Follow the project's C++23 standards and UTF handling patterns"
  4. 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>

  1. Pre-Push Review - Complete comprehensive review using guidelines
  2. CI Validation - All automated tests, security scans, and quality checks pass
  3. Peer Review - Team review focusing on design and maintainability
  4. Integration - Merge only after all standards are met

See CONTRIBUTING.md for complete development guidelines.