C remains the lingua franca of native integration. Daemons, appliances, plugins and embedded Linux products often cannot take a Python runtime, a container or a network dependency, yet they increasingly need speech, vision or language features. The two most practical routes are llama.cpp (and its ggml tensor library) for LLM and speech workloads and ONNX Runtime's C API for everything that can be exported to ONNX.
This course works at the API level. You build llama.cpp as a library with the right backends, then drive the libllama C API directly: loading GGUF models, creating contexts, tokenizing, batching with llama_batch, managing the KV cache and sampling with sampler chains, plus whisper.cpp for speech. You run ONNX models through the OrtApi function table: environments, sessions, tensors, allocators, execution providers and error-status handling. You then go into memory and performance: memory-mapping weights, arena and custom allocators, threading models, NUMA and cache effects, quantization formats, and calling CUDA from C. The final module covers what makes native AI code shippable: an ABI-stable wrapper library, sanitizers, fuzzing GGUF and ONNX parsers, defending against malicious model files, and build and packaging practice. The llama.cpp C API evolves frequently; function names are taught as of October 2026 together with a method for tracking header changes.