1#![doc = include_str!("../README.md")]
2#![deny(warnings, missing_docs)]
3
4pub extern crate ggml_quants;
5
6mod file;
7mod header;
8mod metadata;
9mod name;
10mod read;
11mod tensor;
12mod write;
13
14pub use file::{GGuf, GGufError};
15pub use header::GGufFileHeader;
16pub use metadata::{
17 DEFAULT_ALIGNMENT, GENERAL_ALIGNMENT, GGmlTokenType, GGufFileType, GGufMetaDataValueType,
18 GGufMetaError, GGufMetaKV, GGufMetaMap, GGufMetaMapExt, GGufMetaValueArray,
19};
20pub use name::{GGufExtNotMatch, GGufFileName};
21pub use read::{GGufReadError, GGufReader};
22pub use tensor::{GGmlType, GGmlTypeSize, GGufTensorInfo, GGufTensorMeta};
23pub use write::{
24 DataFuture, GGufFileSimulator, GGufFileWriter, GGufTensorSimulator, GGufTensorWriter,
25 GGufWriter,
26};
27
28#[inline(always)]
29const fn pad(pos: usize, align: usize) -> usize {
30 (align - pos % align) % align
31}