Skip to main content

prepare_ai_extension_sections

Function prepare_ai_extension_sections 

Source
pub fn prepare_ai_extension_sections(
    index_dir: &Path,
    include_vectors: bool,
) -> Result<Vec<(u32, Vec<u8>)>>
Expand description

Read .foxing_index/ files from disk and return them as raw (section_type, bytes) pairs ready for write_archive_seekable_with_ai.

Always includes chunk_map.bin (FXAR_EXT_CHUNK_MAP) and file_map.bin (FXAR_EXT_FILE_MAP) when present. vectors.usearch (FXAR_EXT_HNSW) is included only when include_vectors is true.

Returns an empty Vec if index_dir does not exist.