Skip to main content

Crate urna_format

Crate urna_format 

Source

Re-exports§

pub use chunk::ChunkInput;
pub use chunk::chunk_id;
pub use encoding::DEFAULT_ZSTD_LEVEL;
pub use encoding::INT4_BLOCK;
pub use encoding::Int4EmbeddingsView;
pub use encoding::Int8EmbeddingsView;
pub use encoding::TXT_STREAMS_V1;
pub use encoding::TXT_STREAMS_V2;
pub use encoding::TXT_STREAMS_V3;
pub use encoding::TxtStreams;
pub use encoding::decode_payload;
pub use encoding::decode_payload_with_dict;
pub use encoding::encode_int4_embeddings;
pub use encoding::encode_int8_embeddings;
pub use encoding::encode_txt_streams;
pub use encoding::expected_embeddings_size;
pub use encoding::f16_bytes_to_f32;
pub use encoding::f32_to_f16_bytes;
pub use encoding::int4_blocks_per_row;
pub use encoding::nibble_to_i4;
pub use encoding::pack_nibbles;
pub use encoding::quantize_f32_to_i4;
pub use encoding::quantize_f32_to_i8;
pub use encoding::zstd_encode;
pub use error::Result;
pub use error::UrnaError;
pub use manifest::Capabilities;
pub use manifest::Manifest;
pub use reader::UrnaView;
pub use sections::blob::BLOB_DATA_PAYLOAD_VERSION;
pub use sections::blob::BLOB_REF_NONE;
pub use sections::blob::BLOB_REFS_PAYLOAD_VERSION;
pub use sections::blob::BLOB_SPAN_OVERLAY_PAYLOAD_VERSION;
pub use sections::blob::BlobDataTable;
pub use sections::blob::BlobRefRecord;
pub use sections::blob::BlobSpanEntry;
pub use sections::blob::decode_blob_data_table;
pub use sections::blob::decode_blob_refs;
pub use sections::blob::decode_blob_span_overlay;
pub use sections::blob::encode_blob_data;
pub use sections::blob::encode_blob_refs;
pub use sections::blob::encode_blob_span_overlay;
pub use sections::graph::CsrParts;
pub use sections::graph::EDGE_TYPE_CITATION;
pub use sections::graph::EDGE_TYPE_NEXT_CHUNK;
pub use sections::graph::EDGE_TYPE_SEMANTIC;
pub use sections::graph::Edge;
pub use sections::graph::GRAPH_ADJACENCY_PAYLOAD_VERSION;
pub use sections::graph::GRAPH_MAX_DEGREE;
pub use sections::graph::decode_graph_adjacency;
pub use sections::graph::encode_graph_adjacency;
pub use sections::graph::parse_csr_parts;
pub use sections::OriginalSpan;
pub use sections::SPACE_DTYPE_F16;
pub use sections::SPACE_DTYPE_F32;
pub use sections::SPACE_DTYPE_I4;
pub use sections::SPACE_DTYPE_I8;
pub use sections::SPACE_TABLE_PAYLOAD_VERSION;
pub use sections::SearchContract;
pub use sections::SpaceEntry;
pub use sections::decode_chunk_ids;
pub use sections::decode_chunks_canonical;
pub use sections::decode_chunks_original_spans;
pub use sections::decode_provenance;
pub use sections::decode_search_contract;
pub use sections::decode_space_table;
pub use sections::decode_txt_streams;
pub use sections::encode_chunks_canonical;
pub use sections::encode_space_table;
pub use writer::EmbeddingDType;
pub use writer::SectionEncoding;
pub use writer::UrnaFileBuilder;
pub use layout::*;

Modules§

bytes
Little-endian field readers that return a typed error instead of panicking. Every on-disk decoder used to spell u32::from_le_bytes( b[..4].try_into().unwrap()); the slice was always pre-checked, but a runtime that opens third-party files should not carry an unwrap on its parse path at all (clippy::unwrap_used is denied workspace-wide). A wrong length here is a decoder bug surfaced as UnexpectedEof.
chunk
Canonical chunk types and chunk_id derivation.
encoding
section payload encoding (raw / zstd / float16 / int8).
error
layout
.urna binary file layout (v1)
manifest
Manifest types and constants. The validate impl lives in manifest::validate; the canonical-JSON serializer in manifest::canonical. This module owns the data shape only.
reader
Zero-copy view over a .urna byte slice.
sections
Section payload formats (v1).
writer
Builder for .urna files.