ggml-org.llamacpp
importC++23 module package for llama.cpp b10069 (import llamacpp;)
import llamacpp;
Module name read from the upstream `export module` declaration in src/llamacpp.cppm.
mcpp add ggml-org.llamacpp@b10069
Usage
From this repository's own test project — built and run by CI, not written for the website.
import std;
#if defined(__APPLE__) && defined(__aarch64__)
import llamacpp;
int main() {
llama_backend_init();
const bool metal_available = llama_supports_gpu_offload();
llama_backend_free();
if (!metal_available) {
std::cerr << "Metal backend is not available\n";
return 1;
}
std::cout << "LLAMACPP_METAL_INDEX_TEST=PASS\n";
return 0;
}
#else
int main() {
return 0;
}
// …
tests/examples/llamacpp-metal/tests/backend.cpp · project tests/examples/llamacpp-metal
Build · upstream manifest
- modules
llamacpp- targets
llama (lib)- language
c++23- manifest version
b10069- source
https://raw.githubusercontent.com/mcpplibs/llama.cpp-m/b10069/mcpp.toml
Versions
| Version | Platforms | Mirrors | sha256 |
|---|---|---|---|
b10069 latest |
LinuxWindowsmacOS | source | be0b0deeb311… |