Module storage

Module storage 

Source
Expand description

Binary Storage with Memory Mapping

Provides fast serialization and deserialization of the SemanticIndex using memory-mapped files for instant loading.

File format:

  • Header (32 bytes): magic, version, counts, offsets
  • Symbols section
  • Tokens section
  • References section
  • Scopes section
  • Edges section
  • Files section (length-prefixed paths)
  • Strings section (null-terminated)

@module trace/storage

Functionsยง

load_index
Load a SemanticIndex from a binary file
load_index_streaming
Load a SemanticIndex from a file using streaming (no mmap)
save_index
Save a SemanticIndex to a binary file
trace_index_exists
Check if a trace index exists for a project
trace_index_path
Get the default trace index path for a project