mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-10-09 23:15:23 +00:00
21 lines
585 B
Rust
21 lines
585 B
Rust
|
use std::env;
|
||
|
use std::path::PathBuf;
|
||
|
|
||
|
fn main() {
|
||
|
let bindings = bindgen::Builder::default()
|
||
|
.header("src/wrapper.h")
|
||
|
.prepend_enum_name(false)
|
||
|
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
|
||
|
.generate()
|
||
|
.expect("Unable to generate bindings");
|
||
|
|
||
|
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||
|
bindings
|
||
|
.write_to_file(out_path.join("bindings.rs"))
|
||
|
.expect("Couldn't write bindings!");
|
||
|
|
||
|
pkg_config::Config::new().probe("llama").unwrap();
|
||
|
|
||
|
println!("cargo::rerun-if-changed=build.rs");
|
||
|
}
|