The universal translator between computers and people.
The native foundational C ABI libraries for CatalystUI.
Core is a set of foundational libraries for CatalystUI, providing native C ABI contracts based on the Foundational Definitions Specification (FDEFSPEC) and Foundational Relations Specification (FRELSPEC).
These libraries provide consistent, portable data representations and operations independently of programming language, operating system, or hardware. Core is independent of every layer and sensory domain of the CatalystUI model and exists to support them all.
Core is designed around 8-bit arithmetic as its minimum compatibility requirement, taking advantage of wider numeric representations where beneficial without changing observable behavior. Its public interfaces target C90 and provide thin C++98-compatible wrappers. Platform-specific services require an appropriate native backend.
Note
Core is in beta development (1.0.0-beta.1). Foundational types, text encoding, memory, collections, threading (on supported platforms), and object-oriented composites are implemented. API and ABI stability are not yet guaranteed.
The compile workflow checks C90/C++98 on x86 and C99/C++11 on x64 with GCC on Linux. It also verifies optional-width text encoding fallbacks and cross-compiles portable modules for 8-bit AVR targets. Cross-compilation does not establish runtime support on physical hardware.
| Module | Linker name | Description |
|---|---|---|
| CATALYST | Header-only | Foundational numeric types, text representations, and operation results. |
| CATTELIB | catte |
ASCII, CP1252, UTF-8, and UTF-16LE encoding, decoding, length calculation, and conversion. |
| CATMMLIB | catmm |
Memory representations, native allocation, managed heap allocation, resizing, release, and byte operations. |
| CATRLLIB | catrl |
Set, Map, Array, File, Stream, Queue, Stack, Pool, HashSet, and HashMap. |
| CATTRLIB | cattr |
Process and thread operations, bounded dispatch, and work selection. |
| CATOOLIB | catoo |
Members, objects, fields, methods, properties, structures, classes, and interfaces. |
Each module provides a C header (.h) and a C++ wrapper (.hpp) in include/. The five compiled libraries are available as static and shared targets. CATTRLIB is built on Windows, macOS, and Linux; CATMMLIB provides native allocation backends for the same platforms.
CATTELIB and CATMMLIB depend on the foundational CATALYST headers. CATRLLIB depends on CATMMLIB, while CATTRLIB and CATOOLIB depend on CATRLLIB. CATTRLIB additionally uses native threading facilities.
For more information, see the Core documentation, design assumptions, and API reference.
Download a target-specific package from GitHub Releases.
| Platform | Architectures |
|---|---|
| Windows | x86, x64, ARM64 |
| macOS | x64, ARM64 |
| Linux | x86, x64, ARM64 |
Packages include the public headers, generated target configuration, static and shared libraries, CMake package files, and verification executables. Published static archives contain native machine code rather than compiler-specific IPO data.
The repository uses CMake 4.3 or later, Git, and a C/C++ toolchain appropriate for the selected build preset.
Clone the repository along with its shared build infrastructure:
git clone --recurse-submodules https://github.com/catalystui/lib-core-c.git
Set-Location lib-core-c
cmake --list-presetsIf the repository has already been cloned, initialize its submodule with:
git submodule update --init --recursiveFor example, on an Apple Silicon Mac with the required Xcode toolchain:
cmake --preset aclang17-darwin24.6-arm64
cmake --build --preset aclang17-darwin24.6-arm64-release
cmake --install target/aclang17-darwin24.6-arm64 --config Release --prefix ./packagePreset availability depends on the host and installed toolchain; the presence of a preset does not imply verified runtime support.
Standalone verification programs use the test_<library> and perf_<library> naming conventions. Build options include CATALYST_CORE_BUILD_TESTS, CATALYST_CORE_INSTALL, and CATALYST_RELEASE_STATIC_IPO. Tests and installation are enabled by default in standalone builds and disabled in nested builds. Release static IPO is enabled by default where supported; disable it for native machine-code archives intended for distribution.
Core provides the same namespaced CMake targets when built from source or installed as a package.
| Module | Static target | Shared target |
|---|---|---|
| CATALYST | Catalyst::catalyst (header-only) |
— |
| CATTELIB | Catalyst::catte_static |
Catalyst::catte_shared |
| CATMMLIB | Catalyst::catmm_static |
Catalyst::catmm_shared |
| CATRLLIB | Catalyst::catrl_static |
Catalyst::catrl_shared |
| CATTRLIB | Catalyst::cattr_static |
Catalyst::cattr_shared |
| CATOOLIB | Catalyst::catoo_static |
Catalyst::catoo_shared |
Targets propagate public include paths, the generated configuration, shared-library import definitions, and required library dependencies. CATTRLIB targets are available on supported platforms only. Use a consistent static or shared dependency chain rather than embedding separate copies of stateful Core libraries into multiple shared libraries.
Extract a prebuilt package or install a source build into a dedicated prefix for its target and configuration. Set CMAKE_PREFIX_PATH to that prefix when configuring the consuming project.
find_package(CatalystCore CONFIG REQUIRED)
target_link_libraries(my_application PRIVATE Catalyst::catte_static)Installed packages place runtime libraries and ABI aliases at the package root, development archives and linker aliases under lib/, and public headers under include/. Shared-library consumers must deploy the required runtime libraries and ABI aliases where the native loader can find them.
Use a package compatible with the consuming project's target ABI and toolchain.
Alternatively, use CMake's FetchContent with the consuming project's target toolchain and Catalyst target settings:
include(FetchContent)
if(NOT TARGET Catalyst::catalyst)
FetchContent_Declare(
CatalystCore
GIT_REPOSITORY https://github.com/catalystui/lib-core-c.git
GIT_TAG "${CATALYST_CORE_REVISION}"
GIT_SUBMODULES cmake
)
FetchContent_MakeAvailable(CatalystCore)
endif()
target_link_libraries(my_application PRIVATE Catalyst::catte_static)Set CATALYST_CORE_REVISION to the intended immutable commit or release tag before declaring the dependency. Use the same dependency name, CatalystCore, throughout the build. Prerelease versions do not guarantee compatibility.
Core is developed with AI assistance under human direction. AI coding agents assist with implementation and repository maintenance, while the project owner defines the model, requirements, and design decisions.
AI-assisted contributions are subject to the same expectations for correctness, maintainability, attribution, and licensing as human-written contributions. Their presence does not imply independent line-by-line human review.
The original source code and documentation in this repository are licensed under the Apache License 2.0.