Surface: include/uaii/c_api/uaii.h
API version macros: include/uaii/c_api/version.h
Current C API: UAII_C_API_VERSION = 0.3.0 (pre-1.0; struct_size required)
| Bump | When |
|---|---|
| MAJOR | Removed/renamed symbols, changed struct layouts, changed semantics of existing functions |
| MINOR | New functions/fields (callers compiled against older minors keep working) |
| PATCH | Bug fixes that preserve documented behavior |
Package version (uaii_get_version / CMake PROJECT_VERSION) may advance independently when only C++ internals change. Bindings should gate on uaii_get_c_api_version.
- Opaque handles (
uaii_session*) — never dereference fields from client code. - All functions return
uaii_status; details viauaii_last_error(). - String arguments are UTF-8 paths / names; ownership stays with the caller.
uaii_session_optionsmay grow at the end in minor releases; always calluaii_session_options_initand set/keepstruct_size = sizeof(uaii_session_options).- Defaults are fail-closed:
weight_init = NONE(no silent Ones fill). - Plugin ABI (
UAII_PLUGIN_ABI_VERSION) is separate from the C API version.
| Field | Default | Notes |
|---|---|---|
struct_size |
sizeof(...) |
Required; reject if 0 or larger than library |
backend |
"cpu" |
|
weights_dir |
NULL | |
weight_init |
UAII_WEIGHT_INIT_NONE |
Fail closed |
enable_fusion / enable_memory_reuse |
1 | |
enable_profiler |
0 | |
profile_trace_path |
NULL | |
budget_bytes |
0 | Unlimited |
enable_streaming |
0 | Host staging; CUDA native may async H2D |
allow_missing_weights |
0 | |
weights_sandbox |
NULL | |
compute_dtype |
UAII_COMPUTE_DTYPE_F32 |
Added at end of struct (0.3.0) |
keep_quantized_weights |
1 | GGUF block-quant packed path |
max_context |
0 | 0 = graph metadata / unlimited generate bound |
Callers built against an older header with a smaller struct_size continue to work: the library zero-initializes defaults then copies only struct_size bytes.
The CMake target uaii_capi builds the ABI-stable shared library (uaii_capi.dll / libuaii_capi.so / libuaii_capi.dylib).
Symbols may be marked deprecated in a MINOR release and removed only in the next MAJOR.