Understand the design and safety of llama-cpp-rs-2
mainDesign Philosophy
llama-cpp-rs-2 is a Rust wrapper around the llama.cpp library. It is designed to mimic the llama.cpp API as closely as possible to ensure compatibility and ease of staying up to date with the underlying C++ library.
Safety Warning
This crate is NOT safe. While it provides some safety improvements over raw bindings, it is still possible to misuse the llama.cpp API to cause Undefined Behavior (UB).
Do not use this crate for tasks where Undefined Behavior is unacceptable. It is intended as a low-level wrapper; for ergonomic and safe usage, it is recommended to build a higher-level abstraction on top of this crate.