1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[]
= "llama-cpp-sys-4"
= "Low Level Bindings to llama.cpp"
= "0.8.0"
= "2021"
# The floor is set by the dependency graph, not by this crate's own syntax.
# `llama-cpp-sys-4`'s `ureq` build-dependency pulls url -> idna -> icu_*, which
# declare 1.88; this crate's own code only needs 1.82 (for `&raw const`). Lower
# it only after checking the graph again:
# cargo metadata | jq -r '.packages[]|select(.rust_version)|.rust_version'
= "1.88"
= "MIT OR Apache-2.0"
= "https://github.com/eugenehp/llama-cpp-rs"
= ["llama", "llm", "ggml", "gguf", "inference"]
= ["api-bindings", "external-ffi-bindings"]
= "llama"
= [
# Licence texts. `license = "MIT OR Apache-2.0"` is only a declaration;
# Cargo can package a file only from inside the package directory, and the
# repository's copies live at the workspace root — so without these the
# published crate ships a licence it does not contain. Keep them in sync
# with the root copies.
"LICENSE-MIT",
"LICENSE-APACHE",
# Crate sources
"build.rs",
"prebuilt_download.rs",
"wrapper.h",
"/src",
# Feature patches (applied at build time to the llama.cpp copy in OUT_DIR)
"/patches",
# MTP shim — small C++ wrapper around common/speculative.cpp
"/mtp_shim/**/*",
# shim_support — status codes and error buffer shared by every shim
"/shim_support/**/*",
# ext_shim — C wrappers for C++-only llama.cpp helpers (memory breakdown, fit)
"/ext_shim/**/*",
# chat_shim — C wrappers for common/chat.h and json-schema-to-grammar
"/chat_shim/**/*",
# common_shim — C wrappers for the rest of common/ (sampler, ngram, …)
"/common_shim/**/*",
# llama.cpp top-level
"/llama.cpp/CMakeLists.txt",
"/llama.cpp/convert_hf_to_gguf.py",
# Vendored project's licence. CMake's license.cmake warns without it, and
# shipping it alongside the vendored sources is the right thing regardless.
"/llama.cpp/LICENSE",
# llama.cpp cmake
"/llama.cpp/cmake",
# llama.cpp headers & sources
"/llama.cpp/include/llama.h",
"/llama.cpp/include/llama-cpp.h",
"/llama.cpp/src/**/*",
"/llama.cpp/common/**/*",
# ggml cmake
"/llama.cpp/ggml/CMakeLists.txt",
"/llama.cpp/ggml/cmake",
"/llama.cpp/ggml/src/CMakeLists.txt",
# ggml headers & sources
"/llama.cpp/ggml/include/*.h",
"/llama.cpp/ggml/src/*.h",
"/llama.cpp/ggml/src/*.c",
"/llama.cpp/ggml/src/*.cpp",
# `configure_file` inputs. These are matched by extension here, not by a
# recursive glob like `/llama.cpp/src/**/*`, so a new template upstream is
# silently dropped from the package and only `cargo package` reveals it —
# which is how `ggml-version.h.in` (llama.cpp #28364) broke the published
# crate.
"/llama.cpp/ggml/src/*.in",
# ggml legacy top-level backend files
"/llama.cpp/ggml/src/ggml-cuda.cu",
"/llama.cpp/ggml/src/ggml-metal.m",
"/llama.cpp/ggml/src/ggml-metal.metal",
# ggml backends (ggml-kompute intentionally omitted — its only content is
# an uninitialised nested submodule with no git-tracked files, which causes
# `cargo publish` to abort with "uncommitted changes")
"/llama.cpp/ggml/src/ggml-blas/**/*",
"/llama.cpp/ggml/src/ggml-cann/**/*",
"/llama.cpp/ggml/src/ggml-cpu/**/*",
"/llama.cpp/ggml/src/ggml-cuda/**/*",
# GGML_ET and GGML_OPENVINO default OFF, so cmake never descends into these
# today — but `ggml_add_backend()` is called for both unconditionally, so
# the day a feature turns one on, a published crate without the directory
# fails to configure. Same trap as `ggml-version.h.in`, noted above.
"/llama.cpp/ggml/src/ggml-et/**/*",
"/llama.cpp/ggml/src/ggml-hexagon/**/*",
"/llama.cpp/ggml/src/ggml-hip/**/*",
"/llama.cpp/ggml/src/ggml-metal/**/*",
"/llama.cpp/ggml/src/ggml-musa/**/*",
"/llama.cpp/ggml/src/ggml-opencl/**/*",
"/llama.cpp/ggml/src/ggml-openvino/**/*",
"/llama.cpp/ggml/src/ggml-rpc/**/*",
"/llama.cpp/ggml/src/ggml-sycl/**/*",
"/llama.cpp/ggml/src/ggml-virtgpu/**/*",
"/llama.cpp/ggml/src/ggml-vulkan/**/*",
"/llama.cpp/ggml/src/ggml-webgpu/**/*",
"/llama.cpp/ggml/src/ggml-zdnn/**/*",
"/llama.cpp/ggml/src/ggml-zendnn/**/*",
# ggml misc
"/llama.cpp/ggml/src/llamafile/sgemm.h",
"/llama.cpp/ggml/src/llamafile/sgemm.cpp",
"/llama.cpp/ggml/src/vulkan-shaders/**/*",
# tools (tools/CMakeLists.txt unconditionally add_subdirectory()s all of
# these, so every subdirectory must be present even when only mtmd is
# needed; otherwise cmake exits 1 with "not an existing directory" errors)
"/llama.cpp/tools/CMakeLists.txt",
# All tools sources — cmake's tools/CMakeLists.txt unconditionally
# add_subdirectory()s every tool, so all must be present.
# Exclude server webui public/ assets (5.5 MB JS bundle, not needed for library).
"/llama.cpp/tools/CMakeLists.txt",
"/llama.cpp/tools/batched-bench/**/*",
"/llama.cpp/tools/cli/**/*",
"/llama.cpp/tools/completion/**/*",
"/llama.cpp/tools/cvector-generator/**/*",
"/llama.cpp/tools/export-lora/**/*",
"/llama.cpp/tools/fit-params/**/*",
"/llama.cpp/tools/gguf-split/**/*",
"/llama.cpp/tools/imatrix/**/*",
"/llama.cpp/tools/llama-bench/**/*",
"/llama.cpp/tools/mtmd/**/*",
"/llama.cpp/tools/parser/**/*",
"/llama.cpp/tools/perplexity/**/*",
"/llama.cpp/tools/quantize/**/*",
"/llama.cpp/tools/results/**/*",
"/llama.cpp/tools/rpc/**/*",
"/llama.cpp/tools/server/CMakeLists.txt",
"/llama.cpp/tools/server/server.cpp",
"/llama.cpp/tools/server/httplib.h",
"/llama.cpp/tools/tokenize/**/*",
"/llama.cpp/tools/tts/**/*",
# vendor
"/llama.cpp/vendor/**/*",
]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[]
[]
= { = true }
= { = true, = ["parallel"] }
= "0.1"
= "1.0"
= "0.3.3"
= "0.8.3"
= "0.4"
# Reading `[package.metadata.llama-cpp-sys-4]` and `llama-cpp.toml`. `toml_edit`
# rather than `toml` because the latter gates its document type behind serde,
# which a sys crate has no reason to pull into its build graph.
= { = "0.25", = false, = ["parse"] }
= { = "2.12", = false, = ["tls"] }
[]
= "0.56"
[]
= []
= []
= []
= []
= []
= []
= []
= []
= []
= []
= []
= []
= []
= []
= []
= []
# By default, static libraries are built
# Enable dynamic-link feature to build shared libraries instead