2024-10-04 08:42:31 +00:00
|
|
|
pub mod backend;
|
|
|
|
|
2024-10-24 14:42:50 +00:00
|
|
|
#[cxx::bridge(namespace = "huggingface::tgi::backends::llamacpp::impl")]
|
2024-10-04 08:42:31 +00:00
|
|
|
mod ffi {
|
|
|
|
unsafe extern "C++" {
|
2024-10-24 07:56:40 +00:00
|
|
|
include!("backends/llamacpp/csrc/ffi.hpp");
|
2024-10-04 08:42:31 +00:00
|
|
|
|
|
|
|
/// Represent an instance of the llama.cpp backend instance on C++ side
|
|
|
|
type LlamaCppBackendImpl;
|
2024-10-24 07:56:40 +00:00
|
|
|
|
|
|
|
#[rust_name = "create_llamacpp_backend"]
|
2024-10-24 14:42:50 +00:00
|
|
|
fn CreateLlamaCppBackendImpl(
|
|
|
|
modelPath: &str,
|
|
|
|
) -> Result<UniquePtr<LlamaCppBackendImpl>>;
|
2024-10-04 08:42:31 +00:00
|
|
|
}
|
|
|
|
}
|