|
CX Framework
Cross-platform C utility framework
|
CX is a C utility framework focused on programmer convenience and cross-platform development. It provides high-level constructs while maintaining the performance and control of C.
String library with copy-on-write semantics and automatic rope conversion for very long strings. Provides manipulation functions, searching, comparison operations, and UTF-8 encoding support.
See Strings
Type-safe dynamic arrays (SArray (Dynamic Arrays)) and hash tables (Hash Table) with automatic cleanup and generic iteration via Generic Container Iteration. Provides efficient memory usage without template bloat through the runtime type system.
See Containers
Lightweight runtime type information enabling generic programming without code explosion or template bloat. Supports type-checked argument passing, automatic conversions, and variant types (Variant Types) for flexible data handling.
See SType (Runtime Type System)
Object-oriented programming with classes, interfaces, inheritance, and mixins in pure C. Features automatic reference counting, weak references for breaking cycles, runtime type checking with dynamic casting, and code generation to minimize boilerplate.
See Object System
Cross-platform threading primitives including thread creation and management, mutexes, read-write locks, events, condition variables, and C11-style atomic operations. Provides consistent API across all platforms, even on compilers without native C11 atomics support.
See Threading
Native and virtual filesystem access with unified APIs across platforms. Provides file I/O operations, directory traversal and manipulation, cross-platform path handling, and filesystem metadata queries.
See File System
High-resolution timers and time manipulation functions for precise cross-platform timing operations. Supports duration calculations, timestamps, and timer management.
See Time
Tree-based storage system for hierarchical configuration and data management. Provides path-based access similar to filesystems, thread-safe locking support, and JSON serialization for persistence.
Flexible logging framework with multiple output backends including files, in-memory buffers, and deferred logging. Supports configurable severity levels, formatted output, and structured logging patterns.
See Logging System
Memory allocation system wrapping the high-performance mimalloc allocator. Provides custom alignment support, optional allocations that can fail gracefully, out-of-memory handling policies, and allocation size introspection.
See XAlloc (Memory Management)
Function closures with captured context and automatic lifetime management, enabling advanced callback patterns and functional programming paradigms in pure C without manual context management.
Binary serialization system with automatic endianness handling for portable data storage and network transmission. Ensures data compatibility across different architectures and platforms.
See Serialization
Cross-platform APIs abstracting OS differences for Windows, Linux, FreeBSD, and WebAssembly on x86-64, x86, ARM64, and WASM architectures.
Development and debugging aids including runtime assertions, automatic stack trace generation, crash handlers with diagnostics, black box logging for post-mortem analysis, and error code management.
See Debug
Collection of helper functions and macros for common programming tasks. Includes lazy initialization patterns, generic comparison utilities, callback management, and various convenience functions.
See Utilities
CX is designed to be:
All features work together seamlessly through the runtime type system, making it easy to build complex applications in pure C.