C+
Packages · View as Markdown

llama_cpp

C+ bindings for llama.cpp's C API, in two layers:

  • Raw FFI generated straight from the upstream headers with cpc-bindgen (build.sh), so the binding tracks the C API rather than reimplementing it.
  • A hand-written safe facadeSession, with load / generate / tokenize / decode / sample — over that raw layer, so day-to-day use is ownership-safe C+ rather than raw pointers.

It links libllama and libmtmd; point the manifest [link] search-path at a local llama.cpp build:

[link]
search-paths = ["/path/to/llama.cpp/build"]

See Modules & packages for the [link] table. The llama_cpp_smoke recipe in the compiler repo shows greedy generation end to end. This is the runnable counterpart to the field journal on porting ggml to C+.