Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
5edea99
Update llama.cpp to v0.2.0
mcharytoniuk Aug 24, 2026
7e4ac26
Preserve FFI status codes across platforms
mcharytoniuk Aug 24, 2026
2d10b27
Surface destructor, parser-construction and tool-call parse failures …
mcharytoniuk Aug 24, 2026
70265e8
Pin CI actions and nixpkgs, drop dead docker files, make C++ lints po…
mcharytoniuk Aug 24, 2026
9f8b5f2
Measure llama-cpp-bindings-tests coverage instead of excluding it
mcharytoniuk Aug 24, 2026
898a1a2
Extract shared FFI status crate and treat missing wrapper messages as…
mcharytoniuk Aug 24, 2026
09d6afe
Propagate grammar, chunk-type, NUL-byte and KV-cache failures instead…
mcharytoniuk Aug 24, 2026
aa46bbe
Map every wrapper null-argument status to a typed contract error and …
mcharytoniuk Aug 24, 2026
5553cdb
Classify build targets from cargo cfg variables and type the build er…
mcharytoniuk Aug 24, 2026
e7c3ac6
Distinguish vendored OOM, validate wrapper arguments and report missi…
mcharytoniuk Aug 24, 2026
ba5fbc6
Wrap the llama state buffer API so vendored exceptions cannot unwind …
mcharytoniuk Aug 24, 2026
9de93a4
Restore audio, vision and macro coverage and test every destructor st…
mcharytoniuk Aug 24, 2026
0fe5438
Remove code comments, drop two lint allowances and restore a meaningf…
mcharytoniuk Aug 24, 2026
dd755f0
Lint the build crate and drop lint allowances that no longer suppress…
mcharytoniuk Aug 24, 2026
5d51777
Replace public tuple returns with named result types
mcharytoniuk Aug 25, 2026
59b86c3
Name the classified sample binding distinctly from the sampler
mcharytoniuk Aug 25, 2026
26b5d14
Extract the duplicated tool-call parser helpers into shared modules
mcharytoniuk Aug 25, 2026
a41c0ba
Unify the gguf source type and the tool-call format registry
mcharytoniuk Aug 25, 2026
4a3ae7c
Give integer-overflow and NUL-byte failures structured, source-preser…
mcharytoniuk Aug 25, 2026
25773d0
Assert exact error values where the error type supports comparison
mcharytoniuk Aug 25, 2026
dd7738a
Replace the remaining domain tuples with named types
mcharytoniuk Aug 25, 2026
7f3b74a
Validate grammars through the real GBNF parser instead of a substring…
mcharytoniuk Aug 25, 2026
38ff6e1
Give each module a single public item and flatten the module files
mcharytoniuk Aug 25, 2026
edea8d0
Replace single-letter bindings with descriptive names
mcharytoniuk Aug 25, 2026
f7f68e2
Test the lora adapter path with a real adapter and match the vision a…
mcharytoniuk Aug 25, 2026
a2fd716
Correct the assumptions the LLM suite disproved and surface zero-byte…
mcharytoniuk Aug 25, 2026
8b681e1
Cover the audio pipeline on ultravox and transcription accuracy on ge…
mcharytoniuk Aug 25, 2026
67cb70b
Cover every wrapper contract and vendored-OOM status arm with exact a…
mcharytoniuk Aug 25, 2026
ab40edf
Name the tokenizer input and log record instead of returning tuples
mcharytoniuk Aug 25, 2026
97cfa79
Move helpers above their public item and relocate the kv-cache error
mcharytoniuk Aug 25, 2026
f5f7dc7
Measure the integration-test crate without gating it
mcharytoniuk Aug 25, 2026
0a5fc82
Stop the unwrapped clang-tidy from shadowing the clang-tools wrapper
mcharytoniuk Aug 25, 2026
8662c1a
Extract the C++ wrapper sources and include dirs into their own crate
mcharytoniuk Aug 25, 2026
d625bb8
Drive the C++ linters from a generated compilation database
mcharytoniuk Aug 25, 2026
0655203
Install CI toolchains and linters through composite actions
mcharytoniuk Aug 25, 2026
8848898
Pass the test device explicitly instead of detecting it in shell
mcharytoniuk Aug 25, 2026
39f0e44
Delete the leftover lockfile naming a crate that no longer exists
mcharytoniuk Aug 25, 2026
611db9d
Fix the directory name in the README quick start
mcharytoniuk Aug 25, 2026
d753f52
Compare include directories using native path separators
mcharytoniuk Aug 25, 2026
c8a7112
Restore the unusedFunction suppression and declare the response file …
mcharytoniuk Aug 25, 2026
41a1727
Guard the bindgen privatized fields and drop configuration that match…
mcharytoniuk Aug 25, 2026
54b3cad
Cover the target predicates and feature-gate the CUDA link graph tests
mcharytoniuk Aug 25, 2026
b573662
Inherit lint configuration from the workspace
mcharytoniuk Aug 25, 2026
e11f1e9
Pin the C++ linters and gate only the runtime crates
mcharytoniuk Aug 25, 2026
6ac5c3d
Write down the contracts that tooling cannot enforce
mcharytoniuk Aug 25, 2026
6c1c5da
Keep the link graph test import behind the cuda feature
mcharytoniuk Aug 25, 2026
f3cf62f
Gate the test harness crates again
mcharytoniuk Aug 25, 2026
c5bfc98
Restore the repository guide documents to their previous state
mcharytoniuk Aug 25, 2026
71a2e67
Restore optimization and NDEBUG for MSVC release builds of llama.cpp
malzag Aug 25, 2026
c116454
remove unnecessary comments
malzag Aug 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# clang-tidy for the C++ FFI wrappers (llama-cpp-bindings-sys/*.cpp). Every check
# is enabled and every warning is an error, except:
# - Other-project convention groups this codebase is not and cannot satisfy
# (some of which contradict each other and the modernize checks, e.g.
# fuchsia-trailing-return vs modernize-use-trailing-return-type):
# abseil/altera/android/boost/darwin/fuchsia/linuxkernel/llvm/llvmlibc/mpi/openmp/zircon.
# - bugprone-easily-swappable-parameters: the wrapper signatures mirror the
# llama.cpp C API shape (adjacent llama_pos p0, p1, ...) and cannot be reshaped.
# Headers are out of scope here: they are C-ABI (bindgen parses them as C), so C++
# modernizations would break them. cppcheck lints the headers instead.
Checks: >
*,
-abseil-*,
Expand All @@ -24,5 +14,4 @@ Checks: >
-zircon-*,
-bugprone-easily-swappable-parameters
WarningsAsErrors: '*'
HeaderFilterRegex: '$^'
FormatStyle: none
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

4 changes: 3 additions & 1 deletion .github/actions/install-build-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ runs:
- name: set windows libclang path
if: runner.os == 'Windows'
shell: bash
run: echo "LIBCLANG_PATH=C:\\Program Files\\LLVM\\bin" >> $GITHUB_ENV
env:
WINDOWS_LIBCLANG_PATH: 'C:\Program Files\LLVM\bin'
run: echo "LIBCLANG_PATH=$WINDOWS_LIBCLANG_PATH" >> "$GITHUB_ENV"
4 changes: 2 additions & 2 deletions .github/actions/install-rust-toolchain/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ runs:
steps:
- name: Install toolchain pinned by rust-toolchain.toml
shell: bash
run: cargo --version
run: rustup toolchain install

- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6
24 changes: 15 additions & 9 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
submodules: recursive

Expand All @@ -34,10 +34,9 @@ jobs:
run:
shell: bash
env:
LLAMA_DISABLE_CCACHE: '1'
RUST_BACKTRACE: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
submodules: recursive

Expand All @@ -50,13 +49,18 @@ jobs:
cppcheck:
name: cppcheck
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
submodules: recursive

- run: sudo apt-get update && sudo apt-get install -y cppcheck
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: target/cppcheck-src
key: cppcheck-${{ runner.os }}-${{ hashFiles('Makefile') }}

- uses: ./.github/actions/install-rust-toolchain

- run: make lint.cpp.cppcheck

Expand All @@ -65,10 +69,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
submodules: recursive

- run: sudo apt-get update && sudo apt-get install -y clang-tidy
- uses: ./.github/actions/install-rust-toolchain

- run: make target/lint-venv/bin/clang-tidy

- run: make lint.cpp.clang-tidy
- run: make lint.cpp.clang-tidy CLANG_TIDY=target/lint-venv/bin/clang-tidy
23 changes: 2 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Local test environment files (test env vars are passed through Makefile targets instead)
.env.test

# Mac stuff
.DS_Store

# Node modules (rust-coverage-check npm dependency)
**/*.rs.bk
node_modules/

# LLVM source-based coverage raw and merged profile artifacts
*.profraw
*.profdata
target/
74 changes: 34 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 23 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ members = [
"llama-cpp-bindings",
"llama-cpp-bindings-tests",
"llama-cpp-error-recorder",
"llama-cpp-ffi-status",
"llama-cpp-gbnf",
"llama-cpp-log-decoder",
"llama-cpp-test-harness",
"llama-cpp-test-harness-macros",
"llama-cpp-wrapper-sources",
]

[workspace.package]
edition = "2024"
version = "0.12.0"
version = "0.13.0"
license = "Apache-2.0"
repository = "https://github.com/intentee/llama-cpp-bindings"

Expand All @@ -27,19 +29,20 @@ cmake = "=0.1.58"
encoding_rs = "=0.8.35"
enumflags2 = "=0.7.12"
find_cuda_helper = "=0.2.0"
glob = "=0.3.3"
hf-hub = "=0.5.0"
inventory = "=0.3.24"
libtest-mimic = "=0.8.2"
llama-cpp-bindings = { path = "llama-cpp-bindings", version = "=0.12.0" }
llama-cpp-bindings-build = { path = "llama-cpp-bindings-build", version = "=0.12.0" }
llama-cpp-bindings-sys = { path = "llama-cpp-bindings-sys", version = "=0.12.0" }
llama-cpp-bindings-types = { path = "llama-cpp-bindings-types", version = "=0.12.0" }
llama-cpp-error-recorder = { path = "llama-cpp-error-recorder", version = "=0.12.0" }
llama-cpp-gbnf = { path = "llama-cpp-gbnf", version = "=0.12.0" }
llama-cpp-log-decoder = { path = "llama-cpp-log-decoder", version = "=0.12.0" }
llama-cpp-test-harness = { path = "llama-cpp-test-harness", version = "=0.12.0" }
llama-cpp-test-harness-macros = { path = "llama-cpp-test-harness-macros", version = "=0.12.0" }
llama-cpp-bindings = { path = "llama-cpp-bindings", version = "=0.13.0" }
llama-cpp-bindings-build = { path = "llama-cpp-bindings-build", version = "=0.13.0" }
llama-cpp-bindings-sys = { path = "llama-cpp-bindings-sys", version = "=0.13.0" }
llama-cpp-bindings-types = { path = "llama-cpp-bindings-types", version = "=0.13.0" }
llama-cpp-error-recorder = { path = "llama-cpp-error-recorder", version = "=0.13.0" }
llama-cpp-ffi-status = { path = "llama-cpp-ffi-status", version = "=0.13.0" }
llama-cpp-gbnf = { path = "llama-cpp-gbnf", version = "=0.13.0" }
llama-cpp-log-decoder = { path = "llama-cpp-log-decoder", version = "=0.13.0" }
llama-cpp-test-harness = { path = "llama-cpp-test-harness", version = "=0.13.0" }
llama-cpp-test-harness-macros = { path = "llama-cpp-test-harness-macros", version = "=0.13.0" }
llama-cpp-wrapper-sources = { path = "llama-cpp-wrapper-sources", version = "=0.13.0" }
llguidance = "=1.7.0"
log = "=0.4.29"
nom = "=8.0.0"
Expand All @@ -51,5 +54,12 @@ serial_test = "=3.4.0"
syn = { version = "=2.0.117", features = ["full"] }
thiserror = "=2.0.18"
toktrie = "=1.7.0"
trybuild = "=1.0.116"
walkdir = "=2.5.0"

[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "warn"
unused_qualifications = "warn"

[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
nursery = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
Loading
Loading