1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4
5include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
6
7#[cfg(test)]
8mod tests {
9 use super::*;
10 use std::{ffi::c_void, mem, ptr::null};
11
12 #[test]
13 fn test_ggml_init() {
14 unsafe {
15 let ctx = ggml_init(ggml_init_params {
16 mem_size: 16 * 1024 * 1024,
17 mem_buffer: null::<c_void>() as *mut c_void,
18 no_alloc: false,
19 });
20 ggml_free(ctx);
21 }
22 }
23
24 #[test]
25 fn test_llama_token_bos() {
26 unsafe {
27 let tok = llama_token_bos();
28 assert_eq!(tok, 1);
29 }
30 }
31}